Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / squashing / squash-three-layers.html
1 <!DOCTYPE html>
2 <head>
3 <style>
4 .composited {
5 -webkit-transform: translatez(0);
6 }
7
8 .box {
9   width: 100px;
10   height: 100px;
11 }
12
13 .behind {
14   position: absolute;
15   z-index: 1;
16   top: 100px;
17   left: 100px;
18   background-color: blue;
19 }
20
21 .middle {
22   position: absolute;
23   z-index: 1;
24   top: 40px;
25   left: 40px;
26   background-color: lime;
27 }
28
29 .middle2 {
30   position: absolute;
31   z-index: 1;
32   top: 130px;
33   left: 60px;
34   background-color: magenta;
35 }
36
37 .top {
38   position: absolute;
39   z-index: 1;
40   top: 70px;
41   left: 120px;
42   background-color: cyan;
43 }
44
45 div:hover {
46   background-color: green;
47 }
48
49 </style>
50 <script>
51     if (window.testRunner)
52         testRunner.dumpAsText();
53
54     if (window.internals)
55         internals.settings.setLayerSquashingEnabled(true);
56
57     function runTest()
58     {
59         if (!window.internals) {
60             alert('This test requires window.internals')
61             return;
62         }
63
64         testRunner.display();
65         document.body.textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
66         document.body.style.whiteSpace = 'pre';
67     }
68 </script>
69 </head>
70 <body onload="runTest()">
71 <div class="composited box behind"></div>
72 <div class="box middle"></div>
73 <div class="box middle2"></div>
74 <div class="box top"></div>
75 </body>