Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-display/invisibility/visibility-collapse-invalidation-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Overflow: Invalidation test for content in stacking context in iframe with stacking context in IFC within collapsed column</title>
<link rel="author" title="delan azabani" href="mailto:dazabani@igalia.com">
<link rel="match" href="visibility-collapse-invalidation-001-ref.html">
<meta name="assert" content="Content in the collapsed column should be hidden, even if it creates a new stacking context, it’s in an iframe, that iframe creates a new stacking context, and that iframe is inside an independent formatting context. This test checks that changing the visibility property dynamically can show content that was previously hidden.">
<script src="/common/reftest-wait.js"></script>
<style>
.ifc {
display: flow-root;
}
.stacking-context {
position: relative;
z-index: 1;
width: 100px;
height: 100px;
}
#iframe {
border: none;
width: 100px;
height: 100px;
display: block;
}
#col {
visibility: collapse;
}
</style>
<table>
<col id="col"><col>
<tr>
<td>
<div class="ifc"><iframe id="iframe" class="stacking-context" srcdoc="
<!doctype html>
<body style='margin: 0;'>
<div style='background: green; position: absolute; z-index: 1; width: 100px; height: 100px;'>
"></iframe></div>
<td>
the quick brown fox jumps over the lazy dog.
the quick brown fox jumps over the lazy dog.
the quick brown fox jumps over the lazy dog.
</table>
<script>
iframe.addEventListener("load", () => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
col.style.visibility = "visible";
takeScreenshot();
});
});
});
</script>