content-visibility-auto-nested-scroll-ref.html (731B)
1 <!doctype HTML> 2 <html class="reftest-wait"> 3 <meta charset="utf8"> 4 <title>Content Visibility: content in nested `content-visibility: auto` element can be scrolled to</title> 5 <script src="/common/reftest-wait.js"></script> 6 7 <style> 8 #outer { 9 width: 400px; 10 height: 400px; 11 contain: layout paint size; 12 } 13 14 #inner { 15 position: relative; 16 top: 100px; 17 width: 100px; 18 height: 100px; 19 } 20 </style> 21 22 <div style="height:100vh"></div> 23 <div id="outer" style="border:solid"> 24 <div id="inner" >content with content-visibility: auto</div> 25 </div> 26 27 <script> 28 function runTest() { 29 inner.scrollIntoView(); 30 requestAnimationFrame(takeScreenshot); 31 } 32 window.onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); 33 </script>