non-text-link-invalidation-optimization.html 909 B

12345678910111213141516171819202122232425262728
  1. <!DOCTYPE html>
  2. <script src="resources/text-based-repaint.js"></script>
  3. <style>
  4. div {
  5. display: block;
  6. width: 450px;
  7. height: 100px;
  8. color: red;
  9. }
  10. div:hover {
  11. color: green;
  12. text-decoration: underline;
  13. }
  14. </style>
  15. <!-- Ensure the optimization in https://chromium.googlesource.com/chromium/src/+/b5569d06160fcc6a907d3f41416c7ab1bb4fbcda doesn't break. -->
  16. <div id="div">
  17. This test <img src="resources/bluesquare.png" width="10px" height="10px"> passes if <span>only</span> text is invalidated and <img src="resources/bluesquare.png" width="10px" height="10px"> no <img src="resources/bluesquare.png" width="10px" height="10px"> images.
  18. </div>
  19. <script>
  20. onload = runRepaintAndPixelTest;
  21. function repaintTest() {
  22. if (window.eventSender);
  23. eventSender.mouseMoveTo(div.offsetLeft + 5, div.offsetTop + 5);
  24. finishRepaintTest();
  25. }
  26. </script>