tor-browser

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

paintedlayer-recycling-4.html (1362B)


      1 <!DOCTYPE html>
      2 <html lang="en" class="reftest-wait">
      3 <meta charset="utf-8">
      4 <title>Removing an existing display item from 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 #aboutToBecomeHidden {
     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="aboutToBecomeHidden" style="visibility: visible">
     51  <!--
     52    This item starts out visible, in the same layer as the other .onTopOfFixed item.
     53  -->
     54 </div>
     55 
     56 <div class="onTopOfFixed reftest-no-paint content">
     57  <!--
     58    This item shouldn't repaint when the other .onTopOfFixed item becomes invisible.
     59  -->
     60 </div>
     61 
     62 <script>
     63 
     64 function doTest() {
     65  document.querySelector("#aboutToBecomeHidden").style.visibility = "hidden";
     66  document.documentElement.removeAttribute("class");
     67 }
     68 document.addEventListener("MozReftestInvalidate", doTest);
     69 
     70 </script>