Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype HTML>
<html class="reftest-wait">
<meta charset="utf8">
<title>Content Visibility: auto subtree becomes hidden in the viewport</title>
<link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.org">
<link rel="match" href="container-ref.html">
<meta name="assert" content="content-visibility:auto subtree becomes hidden (through both c-v and visibility properties) and so stops painting">
<script src="/common/reftest-wait.js"></script>
<style>
#container {
width: 150px;
height: 150px;
background: lightblue;
}
#child {
width: 50px;
height: 50px;
background: red;
}
#autocontainer { content-visibility: auto; }
</style>
<div id=container>
<div id="autocontainer">
Test fails if you see this text or a red box.
<div id=child></div>
</div>
</div>
<script>
function runTest() {
document.getElementById("autocontainer").classList.remove("auto");
document.getElementById("autocontainer").classList.add("hidden");
document.getElementById("autocontainer").style.visibility = "hidden";
requestAnimationFrame(takeScreenshot);
}
window.onload = requestAnimationFrame(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
runTest();
});
});
});
</script>
</html>