summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/fixed-position-changed-in-composited-layer.html
blob: 1496686525e32b20ee24317781ecb8eb8863dda3 (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
<!DOCTYPE html>
<html>
<head>
    <style>
        html { overflow: hidden; }
        div { height: 100px; width: 100px; }
        .fixed { position: fixed; }
        .green { background-color: green; }
        .red { background-color: red; }
        .composited { transform: translateZ(0); }
    </style>
    <script type="text/javascript">
        if (window.testRunner)
            testRunner.dumpAsTextWithPixelResults();
        function moveFixedDiv()
        {
            document.getElementById('fixedDiv').style.top = '200px';
        }
        window.addEventListener('load', moveFixedDiv, false);
    </script>
</head>
<body style="height:2000px;">
    <!-- You should see 1 green rectangle in the output and no red. -->
    <div style="top: 200px; left: 100px;" class="fixed red"></div>
    <div id="fixedDiv" style="top: 500px; left:100px;" class="fixed green composited"></div></div>
</body>
</html>