background-position-1.html 868 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE html>
  2. <html lang="en" class="reftest-wait">
  3. <meta charset="utf-8">
  4. <title>Changes to background-position should not cause things to repaint that don't intersect the background image.</title>
  5. <style>
  6. body {
  7. margin: 0;
  8. }
  9. #background {
  10. height: 512px;
  11. background-image: url(image_rgrg-256x256.png);
  12. background-repeat: no-repeat;
  13. background-position: 300px 50px;
  14. }
  15. #not-intersecting-background {
  16. box-sizing: border-box;
  17. width: 200px;
  18. height: 200px;
  19. margin: 50px;
  20. border: 1px solid lime;
  21. }
  22. </style>
  23. <div id="background">
  24. <div id="not-intersecting-background" class="reftest-no-paint"></div>
  25. </div>
  26. <script>
  27. function doTest() {
  28. document.querySelector("#background").style.backgroundPosition = "300px 100px";
  29. document.documentElement.removeAttribute("class");
  30. }
  31. document.addEventListener("MozReftestInvalidate", doTest);
  32. </script>