Make a way to test display-list drawing
[WebKit-https.git] / LayoutTests / displaylists / layer-dispay-list.html
1 <!DOCTYPE html>
2
3 <html>
4 <head>
5     <style>
6         .box {
7             width: 100px;
8             height: 100px;
9             background-color: green;
10             border: 2px solid blue;
11         }
12         
13         .composited {
14             -webkit-transform: translateZ(0);
15         }
16     </style>
17     <script>
18         if (window.testRunner) {
19             testRunner.dumpAsText();
20             testRunner.waitUntilDone();
21         }
22
23         var targetDiv;
24         function doTest()
25         {
26             // document.body.offsetWidth;
27             targetDiv = document.getElementById('target');
28             if (window.internals)
29                 internals.setElementUsesDisplayListDrawing(targetDiv, true);
30             
31             window.setTimeout(function() {
32                 if (window.internals) {
33                     var displayList = internals.displayListForElement(targetDiv);
34                     document.getElementById('output').textContent = displayList;
35                 }
36                 if (window.testRunner)
37                     testRunner.notifyDone();
38             }, 0);
39         }
40         window.addEventListener('load', doTest, false);
41     </script>
42 </head>
43 <body>
44 <div id="target" class="composited box">
45 </div>
46 <pre id="output"></pre>
47 </body>
48 </html>