invalidate-invisible-element.html 726 B

1234567891011121314151617181920212223242526
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script src="resources/text-based-repaint.js" type="text/javascript"></script>
  5. <script type="text/javascript">
  6. window.onload = function() {
  7. runRepaintAndPixelTest();
  8. };
  9. function repaintTest() {
  10. var target = document.getElementById('target');
  11. target.style.visibility = 'visible';
  12. getComputedStyle(target).color;
  13. target.style.top = '300px';
  14. }
  15. </script>
  16. </head>
  17. <body>
  18. <div id="target"
  19. style="visibility:hidden;
  20. position: absolute;
  21. top: 200px; left: 200px;
  22. width: 200px; height: 200px;
  23. background-color: red"></div>
  24. </body>
  25. </html>