layout/reftests/invalidation/scroll-inactive-layers-2.html

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

     1 <!DOCTYPE html>
     2 <html class="reftest-wait">
     3 <title>Scrolling over inactive layers shouldn't repaint their contents even if both the top and the bottom edge of the inactive layers are offscreen</title>
     5 <style>
     7 html, body {
     8   margin: 0;
     9   padding: 0;
    10 }
    12 .outer {
    13   border: 1px solid black;
    14   width: 100px;
    15   height: 2000px;
    16   margin-right: 20px;
    17   padding-top: 200px;
    18   float: left;
    19 }
    21 .opacity {
    22   opacity: 0.5;
    23 }
    25 .transform {
    26   transform: translateX(1px);
    27 }
    29 .filter {
    30   filter: url(#filter);
    31 }
    33 .mask {
    34   mask: url(#mask);
    35 }
    37 .reftest-no-paint {
    38   height: 50px;
    39   border: 1px solid lime;
    40 }
    42 </style>
    44 <svg height="0">
    45   <defs>
    46     <filter id="filter" filterUnits="objectBoundingBox"
    47             x="0%" y="0%" width="100%" height="100%"
    48             color-interpolation-filters="sRGB">
    49       <feMerge><feMergeNode/><feMerge>
    50     </filter>
    51     <mask id="mask" maskContentUnits="objectBoundingBox">
    52       <rect x="0" y="0" width="1" height="1" fill="white"/>
    53     </mask>
    54   </defs>
    55 </svg>
    57 <div class="outer opacity">
    58   <div class="reftest-no-paint"></div>
    59 </div>
    61 <div class="outer transform">
    62   <div class="reftest-no-paint"></div>
    63 </div>
    65 <div class="outer filter">
    66   <div class="reftest-no-paint"></div>
    67 </div>
    69 <div class="outer mask">
    70   <div class="reftest-no-paint"></div>
    71 </div>
    73 <script>
    75 function doTest() {
    76   document.documentElement.scrollTop = 100;
    77   document.documentElement.removeAttribute("class");
    78 }
    79 document.documentElement.scrollTop = 50;
    80 document.addEventListener("MozReftestInvalidate", doTest, false);
    82 </script>

mercurial