content-visibility-auto-nested-scroll.html (1061B)
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 <link rel="author" title="Rob Buis" href="mailto:rbuis@igalia.com"> 6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility"> 7 <link rel="match" href="content-visibility-auto-nested-scroll-ref.html"> 8 <meta name="assert" content="content in nested `content-visibility: auto` element can be scrolled to"> 9 10 <script src="/common/reftest-wait.js"></script> 11 12 <style> 13 div { 14 content-visibility: auto; 15 } 16 #outer { 17 width: 400px; 18 height: 400px; 19 } 20 21 #inner { 22 position: relative; 23 top: 100px; 24 width: 100px; 25 height: 100px; 26 } 27 </style> 28 29 <script> 30 function runTest() { 31 inner.scrollIntoView(); 32 requestAnimationFrame(takeScreenshot); 33 } 34 window.onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest)); 35 </script> 36 37 <div style="height:100vh"></div> 38 <div id="outer" style="border:solid"> 39 <div id="inner">content with content-visibility: auto</div> 40 </div>