| <script src="../../resources/js-test-pre.js"></script> |
| window.enablePixelTesting = true; |
| testRunner.waitUntilDone(); |
| // Layout for the iframe will be scaled down to a quarter. |
| // It appears this bug will only manifest itself if layout for the |
| // iframe has not yet been computed. If we've already laid out |
| // the iframe, then CSSStyleSelector::styleForDocument does not appear |
| // to get called for the iframe. |
| function scalePage(scaleFactor) { |
| window.internals.setPageScaleFactor(scaleFactor, scaleOffset, scaleOffset); |
| // Curiously, the document style for the iframe does not |
| // appear to be recalculated after this |
| document.body.offsetWidth; |
| <script src="../../resources/js-test-pre.js"></script> |
| <iframe id="frame" src="resources/iframe-content-scaling-bug-iframe.html" style="position: absolute; left: 0px; top: 0px; border: none; width: 300px; height: 300px;"></iframe> |
| <div id="rightbox" style="position: absolute; left: 300px; top: 0px; width: 300px; height: 300px; background-color: green;"></div> |
| <script src="../../resources/js-test-post.js"></script> |