| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <!-- | 2 <!-- |
| 3 This test verifies that a fixed position element inside an iframe paints when | 3 This test verifies that a fixed position element inside an iframe paints when |
| 4 it comes into view due to the iframe increasing in size. | 4 it comes into view due to the iframe increasing in size. |
| 5 | 5 |
| 6 If this test passes, you should see a green square. | 6 If this test passes, you should see a green square. |
| 7 --> | 7 --> |
| 8 <html> | 8 <html> |
| 9 <head> | 9 <head> |
| 10 <style> | 10 <style> |
| 11 #iframe-containing-fixed-position-element { | 11 #iframe-containing-fixed-position-element { |
| 12 background: red; | 12 background: red; |
| 13 width: 100px; | 13 width: 100px; |
| 14 height: 0; | 14 height: 0; |
| 15 border: 0; | 15 border: 0; |
| 16 } | 16 } |
| 17 </style> | 17 </style> |
| 18 <script src="../../resources/run-after-display.js"></script> | 18 <script src="../../resources/run-after-display.js"></script> |
| 19 <script> | 19 <script> |
| 20 if (window.testRunner) | 20 if (window.testRunner) |
| 21 testRunner.waitUntilDone(); | 21 testRunner.waitUntilDone(); |
| 22 | 22 |
| 23 if (window.internals) { | 23 if (window.internals) |
| 24 window.internals.settings.setAcceleratedCompositingForFixedPositionE
nabled(true); | 24 window.internals.settings.setAcceleratedCompositingForFixedPositionE
nabled(true); |
| 25 window.internals.settings.setFixedPositionCreatesStackingContext(tru
e); | |
| 26 } | |
| 27 | 25 |
| 28 function runTest() | 26 function runTest() |
| 29 { | 27 { |
| 30 // Initially, the fixed position element in the iframe will not | 28 // Initially, the fixed position element in the iframe will not |
| 31 // paint because the iframe has zero height. | 29 // paint because the iframe has zero height. |
| 32 runAfterDisplay(function() { | 30 runAfterDisplay(function() { |
| 33 // Give the iframe a non-zero height. The fixed position element | 31 // Give the iframe a non-zero height. The fixed position element |
| 34 // inside the iframe should paint now. | 32 // inside the iframe should paint now. |
| 35 var iframeElement = document.getElementById("iframe-containing-f
ixed-position-element"); | 33 var iframeElement = document.getElementById("iframe-containing-f
ixed-position-element"); |
| 36 iframeElement.style.height = "100px"; | 34 iframeElement.style.height = "100px"; |
| 37 | 35 |
| 38 if (window.testRunner) | 36 if (window.testRunner) |
| 39 testRunner.notifyDone(); | 37 testRunner.notifyDone(); |
| 40 }); | 38 }); |
| 41 } | 39 } |
| 42 </script> | 40 </script> |
| 43 </head> | 41 </head> |
| 44 <body onload="runTest()"> | 42 <body onload="runTest()"> |
| 45 <iframe id="iframe-containing-fixed-position-element" src="resources/subfram
e-with-fixed-position-element.html"></iframe> | 43 <iframe id="iframe-containing-fixed-position-element" src="resources/subfram
e-with-fixed-position-element.html"></iframe> |
| 46 </body> | 44 </body> |
| 47 </html> | 45 </html> |
| OLD | NEW |