summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/rtl/rtl-overflow-invalidation.html
blob: 5c9bbb874bbeac6db2b2035024c65d21d16fd99b (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
<!DOCTYPE html>
<html>
<head>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<style>
    body {
        direction: rtl;
        margin: 0px;
    }

    #layer {
        position: absolute;
        top: 50px;
        right: 50px;
        width: 100px;
        height: 100px;
        background-color: red;
    }

    #root {
        width: 1000px;
        height: 1000px;
        transform:translateZ(0);
    }
</style>
<script>
    function doTest() {
        if (window.testRunner) {
            testRunner.waitUntilDone();
            testRunner.dumpAsTextWithPixelResults();
        }
        runAfterLayoutAndPaint(function() {
            // This test passes if this element is repainted correctly, even
            // on a page that is composited and has horizontal overflow.
            var elem = document.getElementById("layer");
            elem.style.backgroundColor = "green";
            if (window.testRunner)
                testRunner.notifyDone();
        });
    }
    window.addEventListener('load', doTest, false);
</script>
<body>
    <div id="layer" class=""></div>
    <div id="root"></div>
</body>
</html>