Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / overflow / accelerated-overflow-scroll-should-not-affect-perspective.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5     .container {
6         width: 200px;
7         height: 200px;
8         position: absolute;
9         overflow: scroll;
10         -webkit-perspective: 100px;
11         -webkit-transform-style: preserve-3d;
12     }
13
14     .child {
15         position: absolute;
16         top: 65px;
17         width: 60px;
18         height: 200px;
19     }
20
21     .first {
22         left: 0px;
23         background-color: green;
24         -webkit-transform: translateZ(10px);
25     }
26
27     .second {
28         left: 65px;
29         background-color: blue;
30         -webkit-transform: translateZ(20px);
31     }
32 </style>
33 <script>
34     if (window.testRunner)
35         testRunner.dumpAsText();
36
37     if (window.internals) {
38         window.internals.settings.setForceCompositingMode(true);
39         window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
40     }
41
42     function runTest() {
43         var pre = document.createElement('pre');
44         if (!window.internals) {
45             var description = "This test ensures that the accelerated overflow "
46                 + "scrolling machinery is not invoked for the body element.";
47             pre.innerHTML = description;
48         } else {
49             document.body.offsetTop;
50             pre.innerHTML = internals.layerTreeAsText(document);
51         }
52         document.body.appendChild(pre);
53     }
54     window.onload = runTest;
55 </script>
56 </head>
57 <body>
58   <div class="container">
59     <div class="child first"> </div>
60     <div class="child second"> </div>
61   </div>
62 </body>
63 </html>