blob: 73e79f74c8ff94b899d5b96054558e4030c5602d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<!DOCTYPE html>
<html>
<head>
<style>
html { overflow: hidden; }
div { height: 100px; width: 100px; }
.fixed { position: fixed; }
.absolute { position: absolute; }
.green { background-color: green; }
.red { background-color: red; }
.composited { transform: translateZ(0); }
</style>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsTextWithPixelResults();
function moveAbsoluteDiv()
{
document.getElementById('absoluteDiv').style.top = '700px';
}
window.addEventListener('load', moveAbsoluteDiv, false);
</script>
</head>
<body style="height:2000px;">
<!-- You should see 1 green rectangle in the output and no red. -->
<div style="top: 200px; left: 100px;" class="fixed red"></div>
<div id="absoluteDiv" style="top: 500px; left:100px;" class="absolute green composited"></div></div>
<script>
window.scrollTo(0, 500);
</script>
</body>
</html>
|