tor-browser

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

content-visibility-064-ref.html (1152B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>CSS Content Visibility: hidden + scrollIntoView (reference)</title>
      5 <link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
      6 <link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
      7 <script src="/common/reftest-wait.js"></script>
      8 
      9 <style>
     10 .spacer {
     11  height: 1000px;
     12  background: lightblue;
     13 }
     14 #container {
     15  position: relative;
     16  width: 150px;
     17  background: lightblue;
     18  contain: paint;
     19 }
     20 #child {
     21  width: 150px;
     22  height: 300px;
     23 }
     24 #target {
     25  position: absolute;
     26  bottom: 0;
     27 
     28  width: 50px;
     29  height: 50px;
     30  background: green;
     31 }
     32 </style>
     33 
     34 <div>top of the page</div>
     35 <div class=spacer></div>
     36 <div id=container>
     37  <div id=child></div>
     38  <div id=target tabindex=0>PASS</div>
     39 </div>
     40 <div class=spacer></div>
     41 <div>bottom of the page</div>
     42 
     43 <script>
     44 function runReference() {
     45  document.getElementById("target").focus();
     46  requestAnimationFrame(takeScreenshot);
     47 }
     48 
     49 window.onload = requestAnimationFrame(() => {
     50  requestAnimationFrame(() => {
     51    requestAnimationFrame(() => {
     52      runReference();
     53    });
     54  });
     55 });
     56 </script>
     57 </html>