Add a setting to enable composited scrolling for frames
[WebKit-https.git] / LayoutTests / compositing / iframes / iframe-composited-scrolling.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4   <style>
5     iframe {
6       height: 150px;
7       width: 150px;
8     }
9   </style>
10   <script>
11     if (window.internals) {
12       internals.settings.setForceCompositingMode(true);
13       internals.settings.setAcceleratedCompositingForScrollableFramesEnabled(true);
14       internals.settings.setCompositedScrollingForFramesEnabled(true);
15     }
16     function doTest()
17     {
18       if (window.testRunner) {
19         testRunner.dumpAsText(false);
20         if (window.internals)
21           document.getElementById("result").innerText = window.internals.nonFastScrollableRects(document).length ? "FAIL" : "PASS";
22       }
23     }
24     window.addEventListener("load", doTest, false);
25   </script>
26 </head>
27 <body>
28   <iframe id="scrollable-iframe" src="resources/subframe.html" style="width: 100px; height: 100px"></iframe>
29   <iframe id="non-scrollable-iframe" src="resources/subframe.html" style="width: 2000px; height: 2000px"></iframe>
30   <pre id="result"></pre>
31 </body>
32 </html>