tor-browser

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

content-visibility-096.html (1194B)


      1 <!doctype HTML>
      2 <html class="reftest-wait">
      3 <meta charset="utf8">
      4 <title>Content Visibility: auto, scroll away and back</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-096-ref.html">
      8 <meta name="assert" content="scolling away from c-v: auto container and back renders as expected">
      9 <script src="/common/reftest-wait.js"></script>
     10 
     11 <style>
     12 .spacer {
     13  height: 10000px;
     14 }
     15 #child {
     16  width: 100px;
     17  height: 100px;
     18  background: green;
     19  position: relative
     20 }
     21 #target {
     22  width: 10px;
     23  height: 10px;
     24 }
     25 .auto { content-visibility: auto; }
     26 
     27 </style>
     28 
     29 <div class="auto">
     30  <div id=child></div>
     31 </div>
     32 <div class=spacer></div>
     33 <div id=target></div>
     34 
     35 <script>
     36 
     37 function runTest() {
     38  document.getElementById("target").scrollIntoView(true /* alignToTop */);
     39  requestAnimationFrame(finishTest);
     40 }
     41 
     42 function finishTest() {
     43  scrollTo(0, 0);
     44  requestAnimationFrame(takeScreenshot);
     45 }
     46 
     47 window.onload = requestAnimationFrame(() => {
     48  requestAnimationFrame(() => {
     49    requestAnimationFrame(() => {
     50      runTest();
     51    });
     52  });
     53 });
     54 
     55 </script>
     56 </html>