5 <style type="text/css" media="screen">
14 border: 1px solid black;
15 transform: translate(0px, 0px);
23 background-color: green;
27 <script type="text/javascript" charset="utf-8">
28 if (window.testRunner) {
29 testRunner.dumpAsText();
30 testRunner.waitUntilDone();
33 function showTree(which)
35 setTimeout(function() {
36 if (window.testRunner) {
37 text += "\n" + which + " dump layer tree:\n";
38 text += window.internals.layerTreeAsText(document);
39 document.getElementById('layers').innerText = text;
46 if (window.testRunner)
47 //document.getElementById('layers').innerText = "";
50 //Put child in compositing mode
51 setTimeout(function() {
52 document.getElementById("child").style.webkitTransform = "perspective(600) translate3D(-50px, 10px, 100px) rotateY(45deg)";
55 // Take it back out of compositing mode
56 setTimeout(function() {
57 document.getElementById("child").style.webkitTransform = "";
60 setTimeout(function() {
61 testRunner.notifyDone();
67 window.addEventListener('load', doTest, false);
73 <!-- Normally we skip making a compositing layer on a parent, even if its children are composited -->
74 <!-- But if the parent has a 2D transform it should get a compositing layer -->
75 <!-- Should see a green box in perspective. Layer tree should show nested layers-->
76 <div id="parent" class="parent">
77 This content is in the parent
78 <div id="child" class="child">
79 Box should switch between perspective and flat
83 <pre id="layers">Layer tree goes here in DRT</pre>