| <!DOCTYPE html> |
| |
| <html> |
| <head> |
| <style type="text/css" media="screen"> |
| .container { |
| -webkit-transform: translateZ(0); |
| background-color: silver; |
| width: 100px; |
| height: 100px; |
| } |
| |
| /* create a render layer with no stacking context */ |
| .clip { |
| position: absolute; |
| top: 0px; |
| left: 0px; |
| width: 100px; |
| height: 100px; |
| overflow: hidden; |
| } |
| |
| /* being clipped, this shouldn't affect container's composited bounds */ |
| .box { |
| position: absolute; |
| top: 100px; |
| left: 100px; |
| height: 100px; |
| width: 100px; |
| background-color: blue; |
| } |
| </style> |
| </head> |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function doTest() |
| { |
| if (window.testRunner) { |
| document.getElementById('layertree').innerText = window.internals.layerTreeAsText(document); |
| testRunner.notifyDone(); |
| } |
| } |
| |
| window.addEventListener('load', doTest, false); |
| </script> |
| <body> |
| <!-- the composited bounds of container should be 100px, not 200px --> |
| <div class="container"> |
| <div class="clip"> |
| <div class="box"></div> |
| </div> |
| </div> |
| <pre id="layertree"></pre> |
| </body> |
| </html> |