summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/iframes/become-overlapped-iframe.html
blob: 5439abccfe423a88f8265e8da11f4bfb15d48807 (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
<!DOCTYPE html>

<html>
<head>
  <style type="text/css" media="screen">
    iframe {
        border: 10px solid black;
        padding: 5px;
        margin: 50px;
        height: 170px;
        width: 320px;
        float: left;
    }
    
    #overlay {
        position: absolute;
        width: 150px;
        height: 50px;
        top: 5px;
        left: 5px;
        background-color: rgba(0, 0, 0, 0.6);
    }
    
    pre {
        clear: both;
    }
  </style>
  <script type="text/javascript" charset="utf-8">
    if (window.testRunner)
        testRunner.dumpAsText();

    function doTest()
    {
        document.getElementById('overlay').style.height = '150px';
        if (window.internals) {
            document.getElementById('layers').innerHTML = window.internals.layerTreeAsText(document);
        }
    }

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

    <!-- Test that the parent document becomes composited when the iframe becomes overlapped. -->
    <!-- The iframe does not start with a Layer. -->
    <iframe id="iframe" src="resources/composited-subframe.html"></iframe>

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