<html> | |
<head> | |
<style> | |
#container { | |
position: absolute; | |
top: 0px; | |
left: 400px; | |
-webkit-transform: translateZ(0); | |
} | |
#red { | |
position: absolute; | |
top: 0px; | |
left: -400px; | |
height: 256px; | |
width: 256px; | |
background-color: red; | |
} | |
#green { | |
position: absolute; | |
left: 0px; | |
top: 0px; | |
width: 300px; | |
height: 300px; | |
background-color: green; | |
} | |
#layertree { | |
position: absolute; | |
left: 10000px; | |
top: 0px; | |
} | |
body { | |
overflow: hidden; | |
} | |
</style> | |
<script> | |
if (window.testRunner) { | |
testRunner.dumpAsText(true); | |
testRunner.waitUntilDone(); | |
} | |
window.addEventListener('load', function() { | |
if (window.testRunner) { | |
document.getElementById("layertree").innerText = testRunner.layerTreeAsText(); | |
testRunner.notifyDone(); | |
} | |
}, false); | |
</script> | |
<body> | |
<!-- container has empty bounds, but is composited --> | |
<div id="container"> | |
<!-- this red square should not appear over the green square --> | |
<div id="red"></div> | |
</div> | |
<!-- This green square should composite because it overlaps the red one --> | |
<div id="green"></div> | |
<pre id="layertree"></pre> | |
</body> | |
</html> |