5 <style type=
"text/css" media=
"screen">
14 border:
1px solid black;
15 transform: translate(
0px,
0px);
23 background-color: blue;
24 transform: translate(
0px,
0px);
33 background-color: yellow;
34 transform: rotate(
30deg);
42 background-color: green;
46 <script type=
"text/javascript" charset=
"utf-8">
47 if (window.testRunner) {
48 testRunner.dumpAsText();
49 testRunner.waitUntilDone();
52 function showTree(which)
54 setTimeout(function() {
55 if (window.testRunner) {
56 text +=
"\n" + which +
" dump layer tree:\n";
57 text += window.internals.layerTreeAsText(document);
58 document.getElementById('layers').innerText = text;
65 if (window.testRunner)
66 //document.getElementById('layers').innerText =
"";
69 //Put child in compositing mode
70 setTimeout(function() {
71 document.getElementById(
"greatgrandchild").style.webkitTransform =
"perspective(400) translate3D(-30px, 30px, 100px) rotateY(60deg)";
74 // Take it back out of compositing mode
75 setTimeout(function() {
76 document.getElementById(
"greatgrandchild").style.webkitTransform =
"";
79 setTimeout(function() {
80 testRunner.notifyDone();
86 window.addEventListener('load', doTest, false);
92 <!-- Normally we skip making a compositing layer on a parent, even if its children are composited -->
93 <!-- But if the parent has a 2D transform it should get a compositing layer -->
94 <!-- Here we test that the entire hierarchy gets layers when some elements are transformed and others arent -->
95 <!-- Should see a box containing a blue box containing a rotated yellow box containing a green box in perspective -->
97 This content is in the parent
100 <div id=
"greatgrandchild">
101 Box should switch between perspective and flat
107 <pre id=
"layers">Layer tree goes here in DRT
</pre>