fast-scrolling.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!DOCTYPE html>
  2. <html lang="en" class="reftest-wait" reftest-async-scroll>
  3. <meta charset="utf-8">
  4. <title>Bug 1164227 - Testcase for the invalid region simplification bug</title>
  5. <style>
  6. #scrollbox {
  7. width: 400px;
  8. height: 500px;
  9. overflow: auto;
  10. margin: 80px;
  11. border: 1px solid black;
  12. }
  13. .contents {
  14. height: 600px;
  15. background: white;
  16. padding: 20px;
  17. position: relative;
  18. }
  19. .boxes > div {
  20. box-sizing: border-box;
  21. width: 10px;
  22. height: 10px;
  23. border: 1px solid black;
  24. float: left;
  25. margin-left: -2px;
  26. }
  27. .boxes > div:nth-child(odd) {
  28. transform: translateY(500px);
  29. }
  30. .reftest-no-paint {
  31. position: absolute;
  32. top: 250px;
  33. left: 30px;
  34. width: 200px;
  35. height: 50px;
  36. border: 1px solid red;
  37. }
  38. </style>
  39. <div id="scrollbox"
  40. reftest-displayport-x="0"
  41. reftest-displayport-y="0"
  42. reftest-displayport-w="400"
  43. reftest-displayport-h="500">
  44. <div class="contents">
  45. <div class="boxes">
  46. <div style="margin-top: 0px"></div>
  47. <div style="margin-top: 1px"></div>
  48. <div style="margin-top: 2px"></div>
  49. <div style="margin-top: 3px"></div>
  50. <div style="margin-top: 4px"></div>
  51. <div style="margin-top: 5px"></div>
  52. <div style="margin-top: 6px"></div>
  53. <div style="margin-top: 7px"></div>
  54. <div style="margin-top: 8px"></div>
  55. <div style="margin-top: 9px"></div>
  56. <div style="margin-top: 10px"></div>
  57. <div style="margin-top: 11px"></div>
  58. <div style="margin-top: 12px"></div>
  59. <div style="margin-top: 13px"></div>
  60. <div style="margin-top: 14px"></div>
  61. <div style="margin-top: 15px"></div>
  62. <div style="margin-top: 16px"></div>
  63. <div style="margin-top: 17px"></div>
  64. <div style="margin-top: 18px"></div>
  65. <div style="margin-top: 19px"></div>
  66. <div style="margin-top: 20px"></div>
  67. <div style="margin-top: 21px"></div>
  68. <div style="margin-top: 22px"></div>
  69. <div style="margin-top: 23px"></div>
  70. <div style="margin-top: 24px"></div>
  71. <div style="margin-top: 25px"></div>
  72. <div style="margin-top: 26px"></div>
  73. <div style="margin-top: 27px"></div>
  74. <div style="margin-top: 28px"></div>
  75. <div style="margin-top: 29px"></div>
  76. <div style="margin-top: 30px"></div>
  77. <div style="margin-top: 31px"></div>
  78. <div style="margin-top: 32px"></div>
  79. <div style="margin-top: 33px"></div>
  80. <div style="margin-top: 34px"></div>
  81. <div style="margin-top: 35px"></div>
  82. <div style="margin-top: 36px"></div>
  83. <div style="margin-top: 37px"></div>
  84. <div style="margin-top: 38px"></div>
  85. <div style="margin-top: 39px"></div>
  86. </div>
  87. <div class="reftest-no-paint"></div>
  88. </div>
  89. </div>
  90. <script>
  91. var scrollbox = document.querySelector("#scrollbox");
  92. scrollbox.scrollTop = 100;
  93. window.addEventListener("MozReftestInvalidate", function (e) {
  94. scrollbox.scrollTop = 0;
  95. document.documentElement.removeAttribute("class");
  96. });
  97. </script>