summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/rtl/rtl-fixed-overflow-scrolled.html
blob: cd6faa4ca956c524e29fba028b1d12a3972b9798 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<html>
<head>
<script src="../../resources/run-after-layout-and-paint.js"></script>
<style>
    body {
        direction: rtl;
        margin: 0px;
        background-color: red;
    }

    .positioned {
        position: fixed;
        top: 50px;
        left: 50px;
        width: 100px;
        height: 100px;
    }

    .indicator {
        background-color: red;
    }

    .layer {
        transform:translateZ(0);
        background-color: green;
    }

    #root {
        width: 1000px;
        height: 1000px;
        background-color: white;
    }

    #layertree {
        position: absolute;
        top: 10000px;
        left: 0px;
    }
</style>
<script>
    function doTest() {
        if (window.testRunner) {
            testRunner.waitUntilDone();
            testRunner.dumpAsTextWithPixelResults();
        }

        // The far left coordinate of the document varies by window width.
        var offset = document.body.clientWidth - document.scrollingElement.scrollWidth + 1;

        window.setTimeout(function() {
            window.scrollTo(offset, 0);
            if (window.testRunner) {
                runAfterLayoutAndPaint(function() {
                    if (top == self)
                        document.getElementById('layertree').innerText = window.internals.layerTreeAsText(document);
                    testRunner.notifyDone();
                });
            }
        }, 0);
    }
    window.addEventListener('load', doTest, false);
</script>
<body>
    <div id="root"></div>
    <div class="positioned indicator"></div>
    <div class="positioned layer"></div>

    <pre id="layertree"></pre>
</body>
</html>