blob: a1d3741788342696ffc73e3d3d38dc9ff36ee1e5 (
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>
<html>
<head>
<style>
.fixed {
position: fixed;
width: 10px;
height: 10px;
background-color: silver;
}
</style>
<script type="text/javascript">
if (window.internals)
window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
if (window.testRunner) {
testRunner.dumpAsText();
window.addEventListener("load", function() {
document.getElementById("layertree").innerText = window.internals.layerTreeAsText(document);
}, false);
}
</script>
</head>
<body>
<div style="height: 1000px">
<pre id="layertree"></pre>
</div>
<!-- Neither of the following elements gets its own layer. -->
<div class="fixed" style="z-index: -1"></div>
<div class="fixed" style="z-index: -1; top: -100px"></div>
<div class="fixed" style="z-index: -1; top: 0px; left: 1000px"></div>
<!-- This element gets its own layer because it intersects with the viewport. -->
<div class="fixed" style="z-index: -1; top: 0px; left: 0px"></div>
</body>
</html>
|