blob: c73c645acd1947adeea4f681e8b7d9a184c86646 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<style>
.scroller {
position: relative;
width: 300px;
height: 300px;
margin: 50px;
border: 15px solid gray;
overflow: scroll;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.scroller > .scroller {
height: 500px;
}
.filler {
width: 100px;
height: 250px;
background-color: silver;
}
.box {
position: absolute;
width: 100%;
height: 100px;
background-color: white;
z-index: 2;
transform: translateZ(0);
}
.upper.box {
top: 150px;
left: 150px;
width: 240px;
background-color: rgba(134, 123, 28, 0.75)
}
.interleaved {
position: absolute;
top: 220px;
left: 250px;
width: 200px;
height: 200px;
background-color: rgba(80, 160, 80, 0.8);
z-index: 1;
transform: translateZ(0);
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
if (window.internals)
internals.setUsesOverlayScrollbars(true);
window.addEventListener('load', () => {
if (window.internals)
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
}, false);
</script>
</head>
<body>
<div class="scroller">
<div class="scroller">
<div class="filler"></div>
<div class="box">
overlaps scrollbar
</div>
<div class="filler"></div>
<div class="filler"></div>
</div>
</div>
<div class="upper box"></div>
<div class="interleaved"></div>
<pre id="layers"></pre>
</body>
</html>