tor-browser

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

fractional-scroll-area-invalidation.html (1194B)


      1 <!DOCTYPE html>
      2 <html lang="en" reftest-async-scroll>
      3 <meta charset="utf-8">
      4 <title>Make sure the scrolled layer is not invalidated when you scroll all the way to the bottom</title>
      5 
      6 <style>
      7 
      8 body {
      9  margin: 0;
     10 }
     11 
     12 .scrollbox {
     13  margin: 50px;
     14  width: 200px;
     15  height: 200px;
     16  overflow: auto;
     17 }
     18 
     19 .scrolled-contents {
     20  height: 150.2px;
     21  padding-top: 150px;
     22 }
     23 
     24 .reftest-no-paint {
     25  margin: 0 20px;
     26  border: 1px solid blue;
     27  height: 25px;
     28 }
     29 
     30 </style>
     31 
     32 <body>
     33 
     34 <div class="scrollbox"
     35     reftest-displayport-x="0" reftest-displayport-y="0"
     36     reftest-displayport-w="200" reftest-displayport-h="200"
     37     reftest-async-scroll-x="0" reftest-async-scroll-y="0">
     38  <div class="scrolled-contents">
     39    <div class="reftest-no-paint">
     40      <!-- This element has the magic "reftest-no-paint" class which
     41           constitutes the actual test here. -->
     42    </div>
     43  </div>
     44 </div>
     45 
     46 <script>
     47 
     48 var scrollbox = document.querySelector(".scrollbox");
     49 scrollbox.scrollTop = 2;
     50 scrollbox.scrollTop = 1;
     51 scrollbox.scrollTop = 0;
     52 
     53 function doTest() {
     54  scrollbox.scrollTop = 999;
     55  document.documentElement.removeAttribute("class");
     56 }
     57 document.addEventListener("MozReftestInvalidate", doTest);
     58 
     59 </script>