summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/scrolling/non-composited-scrolling-repaint-to-ancestor-backing.html
blob: caed95fe18f46209e78e7f8434b67a5c78fc3140 (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
<!DOCTYPE html>
<style>
#container {
    overflow: scroll;
    width: 400px;
    height: 300px;
}

#clipping {
    overflow: hidden;
    height: 1000px;

    position: relative;
    z-index: 0;
}

#clipped {
    height: 10px;
    border: solid 1px black;
    transform: translateZ(0);
}
</style>
<div id="container">
    <div id="clipping">
        <div>Lorem ipsum</div>
        <div id="clipped"></div>
    </div>
</div>
<script>
    if (window.testRunner) {
        testRunner.waitUntilDone();
        testRunner.layoutAndPaintAsyncThen(function() {
            document.getElementById('container').scrollTop = 1000;
            testRunner.notifyDone();
        });
    } else {
        // For manual test.
        setTimeout(function() {
            document.getElementById('container').scrollTop = 1000;
        }, 500);
    }
</script>