layout/reftests/invalidation/scroll-inactive-layers-2.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.

michael@0 1 <!DOCTYPE html>
michael@0 2 <html class="reftest-wait">
michael@0 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>
michael@0 4
michael@0 5 <style>
michael@0 6
michael@0 7 html, body {
michael@0 8 margin: 0;
michael@0 9 padding: 0;
michael@0 10 }
michael@0 11
michael@0 12 .outer {
michael@0 13 border: 1px solid black;
michael@0 14 width: 100px;
michael@0 15 height: 2000px;
michael@0 16 margin-right: 20px;
michael@0 17 padding-top: 200px;
michael@0 18 float: left;
michael@0 19 }
michael@0 20
michael@0 21 .opacity {
michael@0 22 opacity: 0.5;
michael@0 23 }
michael@0 24
michael@0 25 .transform {
michael@0 26 transform: translateX(1px);
michael@0 27 }
michael@0 28
michael@0 29 .filter {
michael@0 30 filter: url(#filter);
michael@0 31 }
michael@0 32
michael@0 33 .mask {
michael@0 34 mask: url(#mask);
michael@0 35 }
michael@0 36
michael@0 37 .reftest-no-paint {
michael@0 38 height: 50px;
michael@0 39 border: 1px solid lime;
michael@0 40 }
michael@0 41
michael@0 42 </style>
michael@0 43
michael@0 44 <svg height="0">
michael@0 45 <defs>
michael@0 46 <filter id="filter" filterUnits="objectBoundingBox"
michael@0 47 x="0%" y="0%" width="100%" height="100%"
michael@0 48 color-interpolation-filters="sRGB">
michael@0 49 <feMerge><feMergeNode/><feMerge>
michael@0 50 </filter>
michael@0 51 <mask id="mask" maskContentUnits="objectBoundingBox">
michael@0 52 <rect x="0" y="0" width="1" height="1" fill="white"/>
michael@0 53 </mask>
michael@0 54 </defs>
michael@0 55 </svg>
michael@0 56
michael@0 57 <div class="outer opacity">
michael@0 58 <div class="reftest-no-paint"></div>
michael@0 59 </div>
michael@0 60
michael@0 61 <div class="outer transform">
michael@0 62 <div class="reftest-no-paint"></div>
michael@0 63 </div>
michael@0 64
michael@0 65 <div class="outer filter">
michael@0 66 <div class="reftest-no-paint"></div>
michael@0 67 </div>
michael@0 68
michael@0 69 <div class="outer mask">
michael@0 70 <div class="reftest-no-paint"></div>
michael@0 71 </div>
michael@0 72
michael@0 73 <script>
michael@0 74
michael@0 75 function doTest() {
michael@0 76 document.documentElement.scrollTop = 100;
michael@0 77 document.documentElement.removeAttribute("class");
michael@0 78 }
michael@0 79 document.documentElement.scrollTop = 50;
michael@0 80 document.addEventListener("MozReftestInvalidate", doTest, false);
michael@0 81
michael@0 82 </script>

mercurial