summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/squashing/squashing-inside-perspective-with-reparented-scrolling.html
blob: 7edd589c91b833f9181e6b7645c125ec2dfe7a46 (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
<!DOCTYPE HTML>
<!--
    This test ensures that the offset from renderer is correctly applied
    to reparented overflow controls, even if they are unclipped.
-->
<style>
#scroller {
    overflow: scroll;
    width: 300px;
    height: 300px;
    position: relative;
    top: 10px;
}

#fixed {
    position: fixed;
    background: blue;
    left: 90px;
    width: 10px;
    height: 10px;
}

#scrolled {
    position: relative;
    background: green;
    width: 80px;
    height: 500px;
}
</style>
<div style="z-index: 1; position: absolute"></div>
<div style="z-index: 0; perspective: 1000px; position: absolute;">
    <div id='scroller'>
        <div id='fixed'></div>
        <div id='scrolled'></div>
    </div>
</div>
<script>
// Check that a case with a reparented overflow control and a containing perspective node
// paints the same with and without layer squashing.
if (window.internals) {
    window.internals.settings.setOverlayScrollbarsEnabled(true);
    window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
}
</script>