tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

scrollIntoView-target-with-contents-hidden-ref.html (801B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>Content Visibility: scrollIntoView should scroll when target has content-visibility: hidden</title>
      5 <link rel="author" title="Martin Robinson" href="mailto:mrobinson@igalia.com">
      6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
      7 
      8 <script src="/common/reftest-wait.js"></script>
      9 
     10 <style>
     11 .spacer {
     12  width: 150px;
     13  height: 3000px;
     14  background: lightblue;
     15 }
     16 #target {
     17  width: 150px;
     18  height: 150px;
     19  background: lightgreen;
     20 }
     21 </style>
     22 
     23 <div class="spacer"></div>
     24 <div id="target"></div>
     25 
     26 <script>
     27 function runTest() {
     28  document.getElementById("target").scrollIntoView();
     29  requestAnimationFrame(takeScreenshot);
     30 }
     31 
     32 window.onload = () => { requestAnimationFrame(runTest); };
     33 </script>
     34 </html>