content-visibility-049.html (1002B)
1 <!doctype HTML> 2 <html class="reftest-wait"> 3 <meta charset="utf8"> 4 <title>Content Visibility: anchor links paint subtrees</title> 5 <link rel="author" title="Rakina Zata Amni" href="mailto:rakina@chromium.org"> 6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> 7 <link rel="match" href="content-visibility-049-ref.html"> 8 <meta name="assert" content="content-visibility auto subtrees respond to anchor links"> 9 10 <script src="/common/reftest-wait.js"></script> 11 12 <style> 13 .spacer { 14 width: 150px; 15 height: 3000px; 16 background: lightblue; 17 } 18 #container { 19 width: 150px; 20 height: 150px; 21 background: lightgreen; 22 content-visibility: auto; 23 } 24 #target { 25 width: 100px; 26 height: 100px; 27 background: green; 28 } 29 </style> 30 31 <div class="spacer"></div> 32 <div id="container"><div id="target"></div></div> 33 34 <script> 35 function runTest() { 36 location.href += "#target"; 37 requestAnimationFrame(takeScreenshot); 38 } 39 40 window.onload = () => { requestAnimationFrame(runTest); }; 41 </script> 42 </html>