tor-browser

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

paintedlayer-recycling-3.html (1395B)


      1 <!DOCTYPE html>
      2 <html lang="en" class="reftest-wait">
      3 <meta charset="utf-8">
      4 <title>Adding a new display item to the bottom of an existing PaintedLayer shouldn't cause the other items in that layer to change layers</title>
      5 
      6 <style>
      7 
      8 .content {
      9  box-sizing: border-box;
     10  width: 200px;
     11  height: 200px;
     12  border: 1px solid black;
     13 }
     14 
     15 .fixed {
     16  position: fixed;
     17  top: 20px;
     18  left: 140px;
     19 }
     20 
     21 .onTopOfFixed {
     22  position: absolute;
     23  top: 120px;
     24  left: 260px;
     25 }
     26 
     27 .reftest-no-paint {
     28  border-color: lime;
     29 }
     30 
     31 #aboutToBecomeVisible {
     32  left: 20px;
     33 }
     34 
     35 body {
     36  margin: 0;
     37  padding: 20px;
     38  height: 3000px;
     39 }
     40 
     41 </style>
     42 
     43 <div class="fixed content">
     44  <!--
     45    This layer is just there to force .onTopOfFixed into a PaintedLayer above
     46    the page background.
     47  -->
     48 </div>
     49 
     50 <div class="onTopOfFixed content" id="aboutToBecomeVisible" style="visibility: hidden">
     51  <!--
     52    This item starts out invisible but should end up in the same layer as the other
     53    .onTopOfFixed item, once it's visible.
     54  -->
     55 </div>
     56 
     57 <div class="onTopOfFixed reftest-no-paint content">
     58  <!--
     59    This item shouldn't repaint when the other .onTopOfFixed item becomes visible.
     60  -->
     61 </div>
     62 
     63 <script>
     64 
     65 function doTest() {
     66  document.querySelector("#aboutToBecomeVisible").style.visibility = "visible";
     67  document.documentElement.removeAttribute("class");
     68 }
     69 document.addEventListener("MozReftestInvalidate", doTest);
     70 
     71 </script>