blob: f0a917636ee1ad33411bdcc28c194c95b41b2bf6 [file] [log] [blame]
<!DOCTYPE>
<html>
<head>
<title>Child layer 3d sorting</title>
<style type="text/css" media="screen">
#parent {
-webkit-transform-style: preserve-3d;
transform: translateZ(0);
}
#child {
width: 200px;
height: 200px;
transform: translateZ(0px);
background: blue;
}
#child > div {
width: 100px;
height: 100px;
transform: translateZ(0px);
background: green;
}
</style>
<script src="../resources/run-after-layout-and-paint.js"></script>
<script type="text/javascript" charset="utf-8">
function doTest()
{
var child = document.getElementById('child');
runAfterLayoutAndPaint(function() {
// Move the parent forward
child.style.webkitTransform = "translateZ(10px)";
}, true);
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- When the test is done, you should see a green square inside the blue square -->
<div id="parent">
<div id="child">
<div></div>
</div>
</div>
</body>
</html>