blob: 7a5cff2697867aa57106670b47951d662e2afdd3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style type="text/css" media="screen">
body {
position: relative;
}
#parent {
position: relative;
width: 300px;
height: 250px;
padding: 20px;
border: 1px solid black;
-webkit-transform: translate(0px, 0px);
}
#child {
position: relative;
left: 10px;
width: 250px;
height: 220px;
background-color: blue;
-webkit-transform: translate(0px, 0px);
}
#grandchild {
position: relative;
top: 10px;
left: 10px;
width: 200px;
height: 200px;
background-color: yellow;
-webkit-transform: rotate(30deg);
}
#greatgrandchild {
position: relative;
left: 100px;
width: 250px;
height: 100px;
background-color: green;
-webkit-transform: perspective(400) translate3D(-30px, 30px, 100px) rotateY(60deg);
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.waitUntilDone();
function doTest()
{
if (window.testRunner)
testRunner.notifyDone();
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- Normally we skip making a compositing layer on a parent, even if its children are composited -->
<!-- But if the parent has a 2D transform it should get a compositing layer -->
<!-- Here we test that the entire hierarchy gets layers when some elements are transformed and others arent -->
<!-- Should see a box containing a blue box containing a rotated yellow box containing a green box in perspective -->
<div id="parent">
This content is in the parent
<div id="child">
<div id="grandchild">
<div id="greatgrandchild">
Box should have perspective
</div>
</div>
</div>
</div>
</body>
</html>