summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/force-compositing-mode/overflow-iframe-leave-compositing.html
blob: e8790b682dc03c3a5b878b44635d2df280aa50ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<html>
<head>
  <style>
    iframe {
      height: 150px;
      width: 150px;
    }
  </style>
  <script>
    if (window.internals) {
      internals.settings.setForceCompositingMode(true);
      internals.settings.setAcceleratedCompositingForScrollableFramesEnabled(true);
    }
    function doTest()
    {
      if (window.testRunner)
        testRunner.display();
      var iframe = document.getElementById("parent-iframe");
      var box = iframe.contentDocument.getElementById("box");
      box.setAttribute("style", "height:50px;width:50px;");
      iframe.contentDocument.body.offsetWidth; // See bug 41999
      if (window.testRunner) {
        testRunner.dumpAsText();
        document.getElementById('layertree').innerText = window.internals.layerTreeAsText(document);
      }
    }
    window.addEventListener("load", doTest, false);
  </script>
</head>
<body>
    <iframe id="parent-iframe" src="resources/subframe-big.html"></iframe>
    <pre id="layertree"></p>
</body>
</html>