summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/repaint/vertical-overflow-parent.html
blob: a15032298a3f2c1aad1f1bf85ae1b2164fd97cc3 (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>
    <style>
        .container {
            margin: 20px;
            width: 300px;
            height: 200px;
            border: 1px solid black;
            overflow: scroll;
        }
        .vertical-rl {
            -webkit-writing-mode: vertical-rl;
        }
        .offset {
            width: 2000px;
            height: 100px;
        }
        .target {
            width: 100px;
            height: 100px;
            background-color: orange;
            visibility: hidden;
        }
    </style>
</head>
<body>
    <div class="vertical-rl">
    <div class="container">
        <div class="offset"></div>
        <div class="target"></div>
    </div></div>
    An orange rect should be painted.<br/>
    In DumpRenderTree, there should be repaint logs of 100x100 rect. We don't care how many times is the log dumpped.
    <script src="../../resources/run-after-layout-and-paint.js"></script>
    <script src="resources/text-based-repaint.js"></script>
    <script>
        repaintTest = function() {
            var target = document.getElementsByClassName("target")[0];
            target.style.visibility = "visible";
        };
        var container = document.getElementsByClassName("container")[0];
        runAfterLayoutAndPaint(function() {
            container.scrollLeft = 0;
            runRepaintTest();
        });
    </script>
</body></html>