blob: 3fda5e5371bd4a565b9432f4b3603dacf7caccbc [file] [log] [blame]
<!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.setAcceleratedCompositingForFixedPositionEnabled(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>