summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/compositing/squashing/squashing-into-ancestor-painted-layer.html
blob: bf4c0098d8544249a968cc9b8d6e72f2e79c16fb (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
<!DOCTYPE HTML>
<!--
  This test creates a scenario where we attempt to squash into a layer that
  paints into its composited ancestor. This should not crash.

  It also happens that we shouldn't promote |container| in this case as its
  composited descendants are invisible, but that's a separate bug. See,
  crbug.com/403894.
-->
<style>
body {
  transform: translateZ(0);
}
#overlapper {
  width: 400px;
  height: 400px;
  left: 200px;
  background: gray;
  position: absolute;
  transform: translateZ(0);
}

#container {
  -webkit-perspective: 1400px;
  position: absolute;
  width: 180px;
  height: 180px;
  background: papayawhip;
}

#composited {
  width: 100px;
  height: 100px;
  left: 200px;
  background: green;
  position: absolute;
  transform: translateZ(10px);
  visibility: hidden;
}

#squashed {
  position: absolute;
  width: 50px;
  height: 50px;
  background: blue;
}
</style>
<div id="overlapper"></div>
<div id="container">
  <div id="composited"></div>
</div>
<div id="squashed"></div>
THIS TEST PASSES IF IT DOES NOT CRASH