blob: 3fda5e5371bd4a565b9432f4b3603dacf7caccbc [file] [log] [blame]
<!DOCTYPE html>
.fixed {
position: fixed;
width: 10px;
height: 10px;
background-color: silver;
<script type="text/javascript">
if (window.internals)
if (window.testRunner) {
window.addEventListener("load", function() {
document.getElementById("layertree").innerText = window.internals.layerTreeAsText(document);
}, false);
<div style="height: 1000px">
<pre id="layertree"></pre>
<!-- 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>