blob: 3e460dc904b616ee4eee2324fead73c01b88b7c4 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<style type="text/css" media="screen">
body {
height: 2600px;
}
.container {
width: 200px;
height: 200px;
margin: 10px;
overflow: auto;
border: 10px solid black;
}
.inner {
width: 100px;
height: 2200px;
padding: 5px;
font-size: 18pt;
background-color: green;
}
.compositing {
position: absolute;
top: 21px;
left: 21px;
width: 100px;
height: 100px;
-webkit-transform: translateZ(0);
}
p {
font: 1em/1 Ahem, sans-serif;
}
p.middle {
position: absolute;
top: 10%;
}
p.bottom {
position: absolute;
bottom: 0;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function doTest()
{
var scrollables = document.querySelectorAll('.container');
for (var i = 0; i < scrollables.length; ++i)
scrollables[i].scrollTop = 100;
if (window.testRunner) {
document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
testRunner.notifyDone();
}
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<!-- Go into compositing. -->
<div class="compositing"></div>
<!-- "middle" text should be visible -->
<div class="container" style="position: relative; overflow: hidden;">
<div class="inner" style="position: relative;">
<p class="top">top</p>
<p class="middle">middle</p>
<p class="bottom">bottom</p>
</div>
</div>
<!-- Vertical scrollbar should be visible -->
<!-- "middle" text should be visible -->
<!-- "inner" should use a tiled layer -->
<div class="container" style="position: relative;">
<div class="inner" style="position: relative;">
<p class="top">top</p>
<p class="middle">middle</p>
<p class="bottom">bottom</p>
</div>
</div>
<pre id="layers">Layer tree goes here in DRT</pre>
</body>
</html>