summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/squashing/squashing-does-not-stop-transform-propagation.html
blob: 726a885637dfa13cbb84035fae9ded816073792f (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
<!DOCTYPE HTML>
<!--
  This test creates a scenario where we have a squashing containment layer
  directly below a layer that applies perspective. We must ensure that the
  perspective transform is correctly propagated.
-->
<style>
body {
    height: 100%;
    margin: 0;
}

#container {
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    perspective: 200px;
    perspective-origin: top left;
}

.scrolled {
    position: absolute;
}

#fg {
    width: 100px;
    height: 100px;
    background: blue;
    left: 100px;
    top: 100px;
}

#bg {
    transform: translateZ(-100px);
    background: green;
    width: 800px;
    height: 800px;
}

#tall {
    width: 10px;
    height: 8000px;
    background: white;
}
</style>
<script>
if (window.internals)
    window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
</script>
<div id="container">
  <div class="scrolled" id="bg"></div>
  <div class="scrolled" id="fg"></div>
  <div id="tall"></div>
</div>