summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/iframes/overlapped-iframe-iframe.html
blob: 810a3dce5dddec689954fb6a5aaa11803796d57d (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<html>
<head>
  <style type="text/css" media="screen">
    body {
        overflow: hidden;
    }

    iframe {
        position: absolute;
        top: 0px;
        left: 0px;
        height: 300px;
        width: 300px;
    }

    #overlap {
        left: 250px;
    }

    pre {
        position: absolute;
        bottom: 2000px;
        left: 0px;
    }
  </style>
  <script>
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.dumpAsText();
    }

    function doTest()
    {
        // For some reason this delay is required for AppKit to not short-circuit the display which is required
        // for overlap testing to kick in.
        window.setTimeout(function() {
            if (window.testRunner) {
                testRunner.display();
                document.getElementById('layers').innerHTML = window.internals.layerTreeAsText(document);
                testRunner.notifyDone();
            }
        }, 0);
    }

    window.addEventListener('load', doTest, false);
  </script>
</head>
<body>

    <iframe src="resources/composited-subframe.html"></iframe>
    <!-- this iframe should become composited because it overlaps the other iframe -->
    <iframe id="overlap" src="resources/subframe.html"></iframe>

    <pre id="layers">Layer tree appears here in DRT.</pre>
</body>
</html>