| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <style type="text/css" media="screen"> | 5 <style type="text/css" media="screen"> |
| 6 iframe { | 6 iframe { |
| 7 border: 10px solid black; | 7 border: 10px solid black; |
| 8 padding: 5px; | 8 padding: 5px; |
| 9 margin: 50px; | 9 margin: 50px; |
| 10 height: 170px; | 10 height: 170px; |
| 11 width: 320px; | 11 width: 320px; |
| 12 float: left; | 12 float: left; |
| 13 } | 13 } |
| 14 | 14 |
| 15 #overlay { | 15 #overlay { |
| 16 position: absolute; | 16 position: absolute; |
| 17 width: 150px; | 17 width: 150px; |
| 18 height: 50px; | 18 height: 50px; |
| 19 top: 5px; | 19 top: 5px; |
| 20 left: 5px; | 20 left: 5px; |
| 21 background-color: rgba(0, 0, 0, 0.6); | 21 background-color: rgba(0, 0, 0, 0.6); |
| 22 } | 22 } |
| 23 | 23 |
| 24 pre { | 24 pre { |
| 25 clear: both; | 25 clear: both; |
| 26 } | 26 } |
| 27 </style> | 27 </style> |
| 28 <script type="text/javascript" charset="utf-8"> | 28 <script type="text/javascript" charset="utf-8"> |
| 29 if (window.testRunner) { | 29 if (window.testRunner) |
| 30 testRunner.dumpAsText(); | 30 testRunner.dumpAsText(); |
| 31 testRunner.waitUntilDone(); | |
| 32 } | |
| 33 | 31 |
| 34 function doTest() | 32 function doTest() |
| 35 { | 33 { |
| 36 // Need to wait for compositing layers to be updated. | 34 document.getElementById('overlay').style.height = '150px'; |
| 37 window.setTimeout(function() { | 35 if (window.internals) { |
| 38 document.getElementById('overlay').style.height = '150px'; | 36 document.getElementById('layers').innerHTML = window.internals.layer
TreeAsText(document); |
| 39 if (window.testRunner) { | 37 } |
| 40 testRunner.display(); // Painting has to happen to detect overla
p. | |
| 41 document.getElementById('layers').innerHTML = window.internals.l
ayerTreeAsText(document); | |
| 42 testRunner.notifyDone(); | |
| 43 } | |
| 44 }, 0); | |
| 45 } | 38 } |
| 46 | 39 |
| 47 window.addEventListener('load', doTest, false); | 40 window.addEventListener('load', doTest, false); |
| 48 </script> | 41 </script> |
| 49 </head> | 42 </head> |
| 50 <body> | 43 <body> |
| 51 | 44 |
| 52 <!-- Test that the parent document becomes composited when the iframe become
s overlapped. --> | 45 <!-- Test that the parent document becomes composited when the iframe become
s overlapped. --> |
| 53 <!-- The iframe does not start with a RenderLayer. --> | 46 <!-- The iframe does not start with a RenderLayer. --> |
| 54 <iframe id="iframe" src="resources/composited-subframe.html"></iframe> | 47 <iframe id="iframe" src="resources/composited-subframe.html"></iframe> |
| 55 | 48 |
| 56 <div id="overlay"> | 49 <div id="overlay"> |
| 57 </div> | 50 </div> |
| 58 | 51 |
| 59 <pre id="layers">Layer tree appears here in DRT.</pre> | 52 <pre id="layers">Layer tree appears here in DRT.</pre> |
| 60 </body> | 53 </body> |
| 61 </html> | 54 </html> |
| OLD | NEW |