summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/repaint/absolute-layer-specified-left-or-right-auto-width-moved-vertically.html
blob: b441f55e25994c11fead31904a9599821a22278d (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
<!DOCTYPE html>
<script>
function test()
{
    if (!window.testRunner || !window.internals)
        return;

    testRunner.dumpAsText();
    document.body.offsetTop;
    internals.startTrackingRepaints(document);

    document.getElementById('left').style.top = '400px';
    document.getElementById('right').style.top = '400px';

    document.body.offsetTop;
    var layerTree = internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
    window.internals.stopTrackingRepaints(document);
    document.getElementById('result').textContent = layerTree.indexOf('repaint') == -1 ? 'SUCCESS' : 'FAIL';
}

window.onload = test;
</script>

<style>
    #left, #right {
        position: absolute;
        top: 200px;
        -webkit-backface-visibility: hidden;
    }
    #left {
        left: 0px;
    }
    #right {
        right: 0px;
    }
</style>

There should be no repaint when the divs are moved vertically.
<div id="left">Left</div>
<div id="right">Right</div>
<pre id="result"></pre>