blob: 364a70c947b6368d0eba9cf9c326fc6a1bd3f446 (
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
56
57
58
|
<style>
.composited {
transform: translateZ(0);
}
img {
background-color: black;
width: 50px;
height: 50px;
}
.box {
width: 100px;
height: 100px;
background-color: blue;
}
.inner {
position: relative;
visibility: visible;
}
#layers {
opacity: 0; /* hide from pixel result */
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function dumpLayers()
{
if (window.testRunner) {
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
}
}
window.addEventListener('load', dumpLayers, false);
</script>
<body>
<div style="position: absolute; left: 0px; top: 0px; z-index: 1; " class="composited">
<img style="position: absolute; left: 10px; top: 10px; z-index: 0;">
<div style="position: absolute; left: 500px; top: 100px; z-index: 1; visibility: hidden;">
stuff
<div class="inner box"></div>
</div>
</div>
<div style="position: absolute; left: 0px; top: 250px; z-index: 1; " class="composited">
<img style="position: absolute; left: 10px; top: 10px; z-index: 0;">
<div style="position: absolute; left: 500px; top: 100px; z-index: 1; visibility: hidden;">
stuff
<!-- Ideally this layer wouldn't affect the bounds of its composited ancestor. -->
<div class="composited inner box"></div>
</div>
</div>
<pre id="layers">Layer tree goes here in DRT</pre>
</body>
|