blob: e582b769c57d6f296af05df406675c2542f62645 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
.container {
position: relative;
height: 100px;
width: 100px;
margin: 10px;
left: 0;
top: 0;
}
.clipping {
position: absolute;
overflow: hidden;
left: 20px;
top: 20px;
height: 100px;
width: 300px;
z-index: 0;
background-color: green;
}
.box {
position: absolute;
top: 75px;
left: 75px;
width: 50px;
height: 50px;
background-color: black;
}
.child {
opacity: 0;
}
.child.changed {
opacity: 0.5;
}
.composited {
-webkit-transform: translateZ(0);
}
</style>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest()
{
document.getElementById('child').classList.add('changed');
dumpLayers();
if (window.testRunner)
testRunner.notifyDone();
}
function dumpLayers()
{
var layersResult = document.getElementById('layers');
if (window.testRunner)
layersResult.innerText = window.internals.layerTreeAsText(document);
}
window.addEventListener('load', doTest, false)
</script>
</head>
<body>
<div class="composited container">
<div id="child" class="child box">
</div>
</div>
</div>
<pre id="layers">Layer tree goes here in DRT</pre>
</body>
</html>