tor-browser

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

paintedlayer-recycling-5.html (1462B)


      1 <!DOCTYPE html>
      2 <html lang="en" class="reftest-wait">
      3 <meta charset="utf-8">
      4 <title>Removing an existing display item that has its own PaintedLayer shouldn't cause invalidations in other PaintedLayers on top of it</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 PaintedLayers 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, and has its own PaintedLayer.
     53  -->
     54 </div>
     55 
     56 <div class="fixed content">
     57  <!--
     58    This layer is just there to force the next .onTopOfFixed into its own
     59    PaintedLayer.
     60  -->
     61 </div>
     62 
     63 <div class="onTopOfFixed reftest-no-paint content">
     64  <!--
     65    This item shouldn't repaint when the other .onTopOfFixed item is hidden.
     66  -->
     67 </div>
     68 
     69 <script>
     70 
     71 function doTest() {
     72  document.querySelector("#aboutToBecomeHidden").style.visibility = "hidden";
     73  document.documentElement.removeAttribute("class");
     74 }
     75 document.addEventListener("MozReftestInvalidate", doTest);
     76 
     77 </script>