blob: 5cceb91064bb72f51a5aeea66cc7bdb4879d3086 [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<title>Tests the ancestor clipping stack where the first layer is a non-scrolling clip</title>
<style>
.clipping {
overflow: hidden;
height: 200px;
width: 300px;
margin: 20px;
border: 5px solid gray;
box-shadow: 0 0 7px black;
padding: 6px;
}
#scroller {
overflow-y: scroll;
height: 300px;
width: 300px;
margin: 20px;
border: 13px solid black;
box-shadow: 0 0 7px black;
padding: 8px;
}
.box {
margin-left: 30px;
width: 100px;
height: 100px;
background-color: blue;
}
.composited {
transform: translateZ(0);
box-shadow: 0 0 4px black;
}
.spacer {
height: 200px;
width: 20px;
background-color: silver;
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
window.addEventListener('load', () => {
scroller.scrollTo(0, 50);
if (window.internals)
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_CLIPPING);
}, false);
</script>
</head>
<body>
<div class="clipping">
<div id="scroller">
<div class="spacer"></div>
<div class="composited box"></div>
<div class="spacer"></div>
</div>
</div>
<pre id="layers"></pre>
</body>
</html>