6efb21cd3d506c622bba0a4b70bfcd17be9a1ea9
[WebKit-https.git] / LayoutTests / scrollingcoordinator / scrolling-tree / coordinated-frame-gain-scrolling-ancestor.html
1 <!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->\r
2 <html>\r
3 <head>\r
4     <style>\r
5         body {\r
6             height: 1000px;\r
7         }\r
8         \r
9         iframe {\r
10             display: block;\r
11             margin: 10px;\r
12             border: 5px solid black;\r
13         }\r
14         \r
15         #container {\r
16             position: absolute;\r
17             top: 10px;\r
18             border: 4px solid green;\r
19             padding: 10px;\r
20         }\r
21         \r
22         #container.fixed {\r
23             position: fixed;\r
24             top: 10px;\r
25             border: 4px solid orange;\r
26         }\r
27         \r
28         #tree {\r
29             position: absolute;\r
30             top: 375px;\r
31         }\r
32     </style>\r
33     <script>\r
34         if (window.testRunner) {\r
35             testRunner.waitUntilDone();\r
36             testRunner.dumpAsText();\r
37             window.internals.settings.setScrollingTreeIncludesFrames(true);\r
38         }\r
39 \r
40         function startTest()\r
41         {\r
42             window.setTimeout(function() {\r
43                 document.getElementById('container').classList.toggle('fixed');\r
44 \r
45                 if (window.internals)\r
46                     document.getElementById('tree').innerText = internals.scrollingStateTreeAsText();\r
47 \r
48                 if (window.testRunner)\r
49                     testRunner.notifyDone();\r
50 \r
51             }, 0);\r
52         }\r
53         \r
54         window.addEventListener('load', startTest, false);\r
55     </script>\r
56 </head>\r
57 <body>\r
58     \r
59     <div id="container">\r
60         <iframe src="resources/doc-with-sticky.html" scrolling="no" width="500" height="300"></iframe>\r
61     </div>\r
62 <pre id="tree">Scrolling tree goes here</pre>\r
63 </body>\r
64 </html>\r