blob: 0ab0aeee352cfaa61cede6ccf953b40727df6a55 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<style>
.scroller {
overflow-x: hidden;
width: 400px;
height: 400px;
border: 2px solid black;
}
.relative {
position: relative;
margin: 20px;
padding: 20px;
height: 200px;
border: 4px solid orange;
}
.absolute {
position: absolute;
background-color: silver;
top: 10px;
left: 10px;
padding: 10px;
width: 200px;
height: 50px;
}
.spacer {
height: 1000px;
}
.composited {
transform: translateZ(0);
}
.composited.absolute {
background-color: silver;
top: 100px;
left: 0;
width: 200px;
height: 200px;
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
window.addEventListener('load', () => {
if (window.internals)
document.getElementById('layers').textContent = internals.layerTreeAsText(document);
}, false);
</script>
</head>
<body>
<div class="scroller">
<div class="relative">
<div class="absolute">
<div class="composited absolute"></div>
</div>
<div class="spacer"></div>
</div>
</div>
<pre id="layers"></pre>
</body>
</html>