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