summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/repaint/fixed-margin-change-repaint.html
blob: 8c12ee6791ce6f0d63eee8db977e18bbd97a2a01 (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
<!DOCTYPE HTML>
<script src="resources/text-based-repaint.js"></script>
<style>
    body {
        margin: 0;
    }
    #container {
        position: relative;
        top: 40px;
        width: 200px;
        height: 400px;
    }
    #test {
        position: fixed;
        background-color: green;
        width: 100px;
        height: 100px;
    }
</style>
<script>
    function repaintTest()
    {
        document.getElementById("test").style['margin-top'] = '20px';
    }
    window.onload = runRepaintTest;
</script>
<div id="container">
    <div id="test"></div>
</div>
Tests the repainting of fixed element when margin-top changes.