scroll-inactive-layers-2.html 1.6 KB

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