| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>This tests that subpixel positioned iframe content's repaint rect is properly calculated.</title> |
| <script>jsTestIsAsync = true;</script> |
| <script src="../../resources/js-test-pre.js"></script> |
| <script> |
| if (window.testRunner && window.internals) { |
| testRunner.dumpAsText(false); |
| internals.startTrackingRepaints(); |
| } |
| |
| var repaintRects; |
| function test() { |
| setTimeout(function() { |
| var iframeDocument = window.frames["embeddedFrame"].document; |
| iframeDocument.getElementById("foo").style.left = "50px"; |
| iframeDocument.body.offsetWidth; |
| if (window.testRunner && window.internals) { |
| repaintRects = internals.repaintRectsAsText(); |
| shouldNotBe("repaintRects.indexOf('rect 0 0 101.50 100')", "-1"); |
| internals.stopTrackingRepaints(); |
| finishJSTest(); |
| } |
| }, 10); |
| } |
| </script> |
| </head> |
| <body> |
| <iframe onload="test()" name="embeddedFrame" style="position:absolute; top: 0px; left: 0.4px; width: 200px; height: 200px" frameBorder=0; srcdoc=' |
| <!DOCTYPE html> |
| <html> |
| <head> |
| <style> |
| div { |
| position: absolute; |
| background: red; |
| height: 100px; |
| width: 100px; |
| top: 0px; |
| left: 0.7px; |
| } |
| </style> |
| </head> |
| <body> |
| <div id=foo></div> |
| </body> |
| </html>'> |
| </iframe> |
| </body> |
| <script src="../../resources/js-test-post.js"></script> |
| </html> |
| |