Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / squashing / squashing-sparsity-heuristic.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 div {
6   position: absolute;
7   z-index: 1;
8   width: 10px;
9   height: 10px;
10 }
11
12 .composited {
13   -webkit-transform: translatez(0);
14   top: 60px;
15   left: 60px;
16   width: 400px;
17   height: 400px;
18   background-color: gray;
19 }
20
21 .overlap1 {
22   top: 140px;
23   left: 140px;
24   background-color: blue;
25 }
26
27 .overlap2 {
28   top: 220px;
29   left: 220px;
30   background-color: lime;
31 }
32 </style>
33 <script>
34     if (window.testRunner)
35         testRunner.dumpAsText();
36
37     if (window.internals)
38         internals.settings.setLayerSquashingEnabled(true);
39
40     function dump() {
41         if (!window.internals)
42             return;
43         var layers = document.createElement('pre');
44         layers.innerHTML = window.internals.layerTreeAsText(document);
45         document.body.appendChild(layers);
46     }
47
48     window.onload = dump;
49 </script>
50 </head>
51
52 <body>
53   <!-- 
54   If this test is working correctly, then the following two layers should not
55   squash together (as they would create a layer that's too sparse).
56   -->
57   <div class="composited"></div>
58   <div id="A" class="overlap1"></div>
59   <div id="B" class="overlap2"></div>
60 </body>
61 </html>