summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fullscreen/full-screen-stacking-context.html
blob: 34f58dfea8d896d4f411f75f3a30b53a18e86f36 (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
57
<!DOCTYPE html>
<html>
    <head>
        <script>
            var runPixelTests = true;
            
            function init() {
                waitForEventAndEnd(document, 'webkitfullscreenchange');
                runWithKeyDown(goFullScreen);
            }
            
            function goFullScreen() {
                document.getElementById('video').webkitRequestFullScreen();
            }
        </script>
        <script src="full-screen-test.js"></script>
        <style>
            #one {
                width: 100px;
                height: 100px;
                position: relative;
                top: 50px;
                left: 50px;
                z-index: 1;
                background-color: red;
            }
            #one, #two {
                opacity: 0.5;
                transform: rotate(180);
                -webkit-mask: -webkit-linear-gradient(left, alpha 0%, white 100%);
                -webkit-filter: contrast(100%);
                clip:rect(0px,100px,100px,0px);
                -webkit-box-reflect: below;
                -webkit-transform-style: preserve-3d;
                -webkit-perspective: 300;
            }
            #zero {
                position: relative;
                z-index: 0;
            }
            #video {
                width: 200px;
                height: 200px;
                background-color: black;
            }
        </style>
    </head>
    <body onload="init()">
        <div>This tests that a full screen element in a lower stacking context blocks a sibling in a higher stacking context.  
             After entering full screen mode, only a black box should be visible.
             Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div>
        <div id="one"></div>
        <div id="zero">
            <video id="video"></video>
        </div>
    </body>
</html>