tor-browser

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

forced-bg-color-outside-visible-region.html (1783B)


      1 <!DOCTYPE html>
      2 <html lang="en" class="reftest-wait" reftest-async-scroll>
      3 <meta charset="utf-8">
      4 <title>Bug 1266161 - Black boxes during scrolling</title>
      5 
      6 <style type="text/css">
      7 
      8 html, body {
      9  margin: 0;
     10  height: 100%;
     11 }
     12 
     13 body {
     14  outline: 2px solid white;
     15 }
     16 
     17 #scrollbox {
     18  overflow: auto;
     19  will-change: transform, scroll-position;
     20  height: 500px;
     21  width: 500px;
     22 }
     23 
     24 #scrolled {
     25  padding-top: 1px;
     26  height: 1200px;
     27 }
     28 
     29 p {
     30  height: 20px;
     31  background: white;
     32  margin-top: 16px;
     33 }
     34 
     35 span, em {
     36  display: block;
     37  background: white;
     38  width: 134px;
     39  height: 14px;
     40  margin-top: 32px;
     41 }
     42 
     43 em {
     44  width: 10px;
     45 }
     46 
     47 </style>
     48 
     49 <div id="scrollbox"
     50   reftest-displayport-x="0"
     51   reftest-displayport-y="0"
     52   reftest-displayport-w="500"
     53   reftest-displayport-h="500">
     54 
     55  <div id="scrolled">
     56    <p></p>
     57    <p></p>
     58    <p></p>
     59    <span style="margin-top: 48px"></span>
     60    <span style="margin-top: 64px"></span>
     61    <span style="margin-top: 96px"></span>
     62    <span style="margin-top: 96px"></span>
     63    <em></em>
     64    <span></span>
     65    <span></span>
     66    <span></span>
     67    <span></span>
     68    <span></span>
     69    <span></span>
     70    <span></span>
     71    <span></span>
     72    <span></span>
     73    <span></span>
     74    <span></span>
     75    <span></span>
     76    <span></span>
     77  </div>
     78 
     79 </div>
     80 
     81 <script>
     82 
     83 var scrollbox = document.getElementById("scrollbox");
     84 
     85 var pos = [ 170, 100, 248, 182, 130, 80 ];
     86 
     87 var i = 0;
     88 function scrollToNextPos() {
     89  scrollbox.scrollTop = pos[i++];
     90 }
     91 
     92 scrollToNextPos();
     93 
     94 window.addEventListener("MozReftestInvalidate", function () {
     95  requestAnimationFrame(function scrollAndScheduleNext() {
     96    scrollToNextPos();
     97    if (i < pos.length) {
     98      requestAnimationFrame(scrollAndScheduleNext);
     99    } else {
    100      document.documentElement.className = "";
    101    }
    102  });
    103 });
    104 
    105 </script>