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

Thu, 15 Jan 2015 15:59:08 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:59:08 +0100
branch
TOR_BUG_9701
changeset 10
ac0c01689b40
permissions
-rw-r--r--

Implement a real Private Browsing Mode condition by changing the API/ABI;
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</title>
     5 <style>
     7 .outer {
     8   border: 1px solid black;
     9   width: 100px;
    10   height: 2000px;
    11   margin-top: 200px;
    12   margin-right: 20px;
    13   padding-top: 100px;
    14   float: left;
    15 }
    17 .opacity {
    18   opacity: 0.5;
    19 }
    21 .transform {
    22   transform: translateX(1px);
    23 }
    25 .filter {
    26   filter: url(#filter);
    27 }
    29 .mask {
    30   mask: url(#mask);
    31 }
    33 .reftest-no-paint {
    34   height: 50px;
    35   border: 1px solid lime;
    36 }
    38 </style>
    40 <svg height="0">
    41   <defs>
    42     <filter id="filter" filterUnits="objectBoundingBox"
    43             x="0%" y="0%" width="100%" height="100%"
    44             color-interpolation-filters="sRGB">
    45       <feMerge><feMergeNode/><feMerge>
    46     </filter>
    47     <mask id="mask" maskContentUnits="objectBoundingBox">
    48       <rect x="0" y="0" width="1" height="1" fill="white"/>
    49     </mask>
    50   </defs>
    51 </svg>
    53 <div class="outer opacity">
    54   <div class="reftest-no-paint"></div>
    55 </div>
    57 <div class="outer transform">
    58   <div class="reftest-no-paint"></div>
    59 </div>
    61 <div class="outer filter">
    62   <div class="reftest-no-paint"></div>
    63 </div>
    65 <div class="outer mask">
    66   <div class="reftest-no-paint"></div>
    67 </div>
    69 <script>
    71 function doTest() {
    72   document.documentElement.scrollTop = 100;
    73   document.documentElement.removeAttribute("class");
    74 }
    75 document.addEventListener("MozReftestInvalidate", doTest, false);
    77 </script>

mercurial