masklayer-2.html 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html>
  2. <html lang="en" reftest-async-scroll>
  3. <meta charset="utf-8">
  4. <title>Moving a layer in a box with a rounded clip shouldn't invalidate.</title>
  5. <style>
  6. #scrollbox {
  7. position: absolute;
  8. top: 50px;
  9. left: 50px;
  10. width: 300px;
  11. height: 200px;
  12. background-color: #DDD;
  13. overflow: auto;
  14. border-radius: 10px;
  15. }
  16. #scrollable {
  17. width: 600px;
  18. }
  19. #scrolledLayer {
  20. margin-top: 50px;
  21. margin-left: 100px;
  22. box-model: border-box;
  23. border: 1px solid lime;
  24. width: 100px;
  25. height: 100px;
  26. }
  27. </style>
  28. <body>
  29. <div id="scrollbox" reftest-displayport-x="0"
  30. reftest-displayport-y="0"
  31. reftest-displayport-w="300"
  32. reftest-displayport-h="200">
  33. <div id="scrollable">
  34. <div id="scrolledLayer" class="reftest-no-paint"></div>
  35. </div>
  36. </div>
  37. <script>
  38. var scrollbox = document.getElementById("scrollbox");
  39. function doTest() {
  40. scrollbox.scrollLeft = 0;
  41. document.documentElement.removeAttribute("class");
  42. }
  43. // Make #scrollbox have active scrolling
  44. scrollbox.scrollLeft = 60;
  45. scrollbox.offsetLeft;
  46. scrollbox.scrollLeft = 40;
  47. scrollbox.offsetLeft;
  48. document.addEventListener("MozReftestInvalidate", doTest, false);
  49. </script>