tor-browser

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

scrollIntoView-with-focus-target-with-contents-hidden.html (1083B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>Content Visibility: scrollIntoView triggered by focus() 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 <link rel="match" href="scrollIntoView-with-focus-target-with-contents-hidden-ref.html">
      8 <meta name="assert" content="scrollIntoView triggered by focus() works properly when used on target with content-visibility: hidden">
      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 #target {
     19  width: 150px;
     20  height: 150px;
     21  background: lightgreen;
     22  content-visibility: hidden;
     23 }
     24 </style>
     25 
     26 <div class="spacer"></div>
     27 <div id="target" tabindex="0">FAIL</div>
     28 
     29 <script>
     30 function runTest() {
     31  document.getElementById("target").focus();
     32  requestAnimationFrame(takeScreenshot);
     33 }
     34 
     35 window.onload = () => { requestAnimationFrame(runTest); };
     36 </script>
     37 </html>