blob: b445408fbc5a699fc2d9ed9a51d7fb4f37315e5d [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Overflow, positioning and compositing</title>
<style type="text/css" media="screen">
.container {
display: inline-block;
width: 150px;
height: 150px;
overflow:scroll;
margin: 10px;
border: 1px solid black;
}
.inner {
width: 200px;
height: 500px;
padding: 5px;
font-size: 18pt;
background-color: gray;
}
</style>
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.waitUntilDone();
function doTest()
{
var scrollables = document.querySelectorAll('.container');
for (var i = 0; i < scrollables.length; ++i)
{
scrollables[i].scrollTop = 50;
}
requestAnimationFrame(function() {
setTimeout(function() {
if (window.testRunner)
testRunner.notifyDone();
});
});
}
window.addEventListener('load', doTest, false);
</script>
</head>
<body>
<p>All of the boxes should look the same.</p>
<div class="container">
<div class="inner" style="will-change: transform;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container">
<div class="inner" style="position: relative; will-change: transform;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container" style="position: relative">
<div class="inner" style="will-change: transform;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container" style="position: relative">
<div class="inner" style="position: relative; will-change: transform;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<br>
<div class="container" style="will-change: transform;">
<div class="inner">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container" style="will-change: transform;">
<div class="inner" style="position: relative;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container" style="will-change: transform;">
<div class="inner" style="will-change: transform;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container" style="will-change: transform;">
<div class="inner" style="position: relative; will-change: transform;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<br>
<div class="container" style="position: relative; will-change: transform;">
<div class="inner">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container" style="position: relative; will-change: transform;">
<div class="inner" style="position: relative;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container" style="position: relative; will-change: transform;">
<div class="inner" style="will-change: transform;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
<div class="container" style="position: relative; will-change: transform;">
<div class="inner" style="position: relative; will-change: transform;">
<p>
This is the inner div that scrolls.
</p>
</div>
</div>
</body>
</html>