summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/fixed-background-negative-z-index-fixed.html
blob: 92658efcd4c76b83e8a00e37e98efd909bb6818e (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
<!DOCTYPE html>

<html>
<head>
    <style>
        body {
            height: 2000px;
            background-image: url('resources/simple_image.png');
            background-size: 200px 200px;
            background-attachment: fixed;
            overflow: hidden; /* hide scrollbar */
        }
        .fixed {
            position: fixed;
            z-index: -1;
            top: 50px;
            left: 50px;
            width: 200px;
            height: 200px;
            background-color: silver;
        }
    </style>
    <script>
    if (window.testRunner) {
        testRunner.waitUntilDone();
        window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
    }

    function doTest()
    {
        window.scrollTo(0, 223);
        if (window.testRunner)
            testRunner.notifyDone();
    }

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

    <div class="fixed box"></div>

</body>
</html>