| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>This tests absolute positioned elements' repaint clipping after move. Pass if all borders are painted properly.</title> |
| <head> |
| <style> |
| div { |
| position: absolute; |
| border: green solid 1px; |
| width: 20px; |
| height: 20px; |
| left: 0px; |
| top: 0px; |
| } |
| </style> |
| </head> |
| <body> |
| <p id="container"></p> |
| <script> |
| var container = document.getElementById("container"); |
| for (j = 0; j < 10; ++j) { |
| var e = document.createElement("div"); |
| e.style.left = (25 * j) + "px"; |
| container.appendChild(e); |
| } |
| |
| function move() { |
| divs = document.getElementsByTagName("div"); |
| for (i = 0; i < divs.length; ++i) |
| divs[i].style.left = (parseFloat(divs[i].style.left) + 0.3) + "px"; |
| |
| if (window.testRunner && window.internals) { |
| var dummy = document.body.offsetTop; |
| var repaintRects = window.internals.repaintRectsAsText(); |
| window.internals.stopTrackingRepaints(); |
| |
| var pre = document.createElement('pre'); |
| document.body.appendChild(pre); |
| pre.innerHTML = repaintRects; |
| testRunner.notifyDone(); |
| } |
| } |
| |
| if (window.testRunner && window.internals) { |
| window.testRunner.dumpAsText(false); |
| window.internals.startTrackingRepaints(); |
| testRunner.waitUntilDone(); |
| } |
| |
| setTimeout(move, 0); |
| </script> |
| </body> |
| </html> |