Upstream version 6.35.121.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / absolute-inside-out-of-view-fixed.html
1 <!DOCTYPE html>
2 <html>
3
4 <head>
5     <script src="../resources/run-after-display.js"></script>
6     <style>
7         body {
8             margin: 0;
9             height: 2500px;
10         }
11
12         .box {
13           height: 100px;
14           width: 100px;
15         }
16
17         .fixed {
18             position: fixed;
19             left: 0px;
20             top: 0px;
21         }
22
23         .wrapper {
24           position: absolute;
25           background-color: green;
26         }
27         
28     </style>
29     <script>
30       if (window.testRunner) {
31         testRunner.waitUntilDone();
32         testRunner.dumpAsText();
33       }
34       if (window.internals) {
35           window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true);
36       }
37
38       function doScroll()
39       {
40         window.setTimeout(function() {
41           window.scrollTo(0, 200);
42
43           runAfterDisplay(function() {
44             if (window.internals) {
45               document.getElementById('results').innerText = internals.layerTreeAsText(document);
46               if (window.testRunner) {
47                 testRunner.notifyDone();
48               }
49             }
50           });
51         }, 10);
52       }
53       
54       window.addEventListener('load', doScroll, false);
55     </script>
56 </head>
57 <body>
58   <pre id="results"></pre>
59   <div class="fixed">
60     <div class="wrapper box">
61     </div>
62   </div>
63 </body>
64 </html>