| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <style> | 3 <style> |
| 4 ::-webkit-scrollbar { | 4 ::-webkit-scrollbar { |
| 5 width: 0px; | 5 width: 0px; |
| 6 height: 0px; | 6 height: 0px; |
| 7 } | 7 } |
| 8 </style> | 8 </style> |
| 9 <script src="../js/resources/js-test-pre.js"></script> | 9 <script src="../../resources/js-test.js"></script> |
| 10 <script> | 10 <script> |
| 11 window.enablePixelTesting = true; | 11 window.enablePixelTesting = true; |
| 12 | 12 |
| 13 if (window.testRunner) | 13 if (window.testRunner) |
| 14 testRunner.waitUntilDone(); | 14 testRunner.waitUntilDone(); |
| 15 | 15 |
| 16 // Layout for the iframe will be scaled down to a quarter. | 16 // Layout for the iframe will be scaled down to a quarter. |
| 17 // It appears this bug will only manifest itself if layout for the | 17 // It appears this bug will only manifest itself if layout for the |
| 18 // iframe has not yet been computed. If we've already laid out | 18 // iframe has not yet been computed. If we've already laid out |
| 19 // the iframe, then CSSStyleSelector::styleForDocument does not appear | 19 // the iframe, then CSSStyleSelector::styleForDocument does not appear |
| 20 // to get called for the iframe. | 20 // to get called for the iframe. |
| 21 scalePage(0.5); | 21 scalePage(0.5); |
| 22 | 22 |
| 23 function scalePage(scaleFactor) { | 23 function scalePage(scaleFactor) { |
| 24 var scaleOffset = 0; | 24 var scaleOffset = 0; |
| 25 if (window.eventSender) { | 25 if (window.eventSender) { |
| 26 window.eventSender.setPageScaleFactor(scaleFactor, scaleOffset, scal
eOffset); | 26 window.eventSender.setPageScaleFactor(scaleFactor, scaleOffset, scal
eOffset); |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 | 29 |
| 30 function test() { | 30 function test() { |
| 31 // Curiously, the document style for the iframe does not | 31 // Curiously, the document style for the iframe does not |
| 32 // appear to be recalculated after this | 32 // appear to be recalculated after this |
| 33 scalePage(1.0); | 33 scalePage(1.0); |
| 34 document.body.offsetWidth; | 34 document.body.offsetWidth; |
| 35 if (window.testRunner) | 35 if (window.testRunner) |
| 36 testRunner.notifyDone(); | 36 testRunner.notifyDone(); |
| 37 } | 37 } |
| 38 </script> | 38 </script> |
| 39 <script src="../js/resources/js-test-pre.js"></script> | 39 <script src="../../resources/js-test.js"></script> |
| 40 </head> | 40 </head> |
| 41 <body onload="test();"> | 41 <body onload="test();"> |
| 42 <iframe id="frame" src="resources/iframe-content-scaling-bug-iframe.html" styl
e="position: absolute; left: 0px; top: 0px; border: none; width: 300px; height:
300px;"></iframe> | 42 <iframe id="frame" src="resources/iframe-content-scaling-bug-iframe.html" styl
e="position: absolute; left: 0px; top: 0px; border: none; width: 300px; height:
300px;"></iframe> |
| 43 <div id="rightbox" style="position: absolute; left: 300px; top: 0px; width: 30
0px; height: 300px; background-color: green;"></div> | 43 <div id="rightbox" style="position: absolute; left: 300px; top: 0px; width: 30
0px; height: 300px; background-color: green;"></div> |
| 44 </body> | 44 </body> |
| 45 </html> | 45 </html> |
| OLD | NEW |