blob: ec0fb480fb80e683db7de98b1eefd482a26b4f9d [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
<html>
<head>
<title>Test scrolling tree stucture with various positioning and clipping configurations</title>
<style>
.scroller {
margin: 10px;
background-color: silver;
border: 1px solid black;
padding: 10px;
width: 200px;
height: 150px;
overflow: scroll;
}
.stacking-containing {
position: relative;
z-index: 0;
}
.stacking {
opacity: 0.75;
}
.box {
width: 100px;
height: 100px;
background-color: blue;
}
.absolute {
position: absolute;
left: 100px;
}
.composited {
transform: translateZ(0);
background-color: orange;
}
.scrolling-content {
height: 1000px;
}
</style>
<script>
if (window.testRunner)
testRunner.dumpAsText();
function doTest() {
if (window.internals)
document.getElementById('scrollingTree').innerText = window.internals.scrollingStateTreeAsText() + "\n";
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<div class="scroller">
<div class="scrolling-content">
Scrolling content
<div class="absolute box"></div>
<div class="composited box"></div>
</div>
</div>
<div class="scroller">
<div class="scrolling-content">
Scrolling content
<div class="scroller">
<div class="scrolling-content">
Scrolling content
<div class="absolute box"></div>
</div>
</div>
</div>
</div>
<div class="scroller stacking-containing">
<div class="scrolling-content">
Scrolling content
<div class="absolute box"></div>
<div class="composited box"></div>
</div>
</div>
<div class="scroller stacking">
<div class="scrolling-content">
Scrolling content
<div class="absolute box"></div>
<div class="composited box"></div>
</div>
</div>
<pre id="scrollingTree"></pre>
</body>
</html>