blob: 1496686525e32b20ee24317781ecb8eb8863dda3 [file] [log] [blame]
<!DOCTYPE html>
html { overflow: hidden; }
div { height: 100px; width: 100px; }
.fixed { position: fixed; }
.green { background-color: green; }
.red { background-color: red; }
.composited { transform: translateZ(0); }
<script type="text/javascript">
if (window.testRunner)
function moveFixedDiv()
document.getElementById('fixedDiv') = '200px';
window.addEventListener('load', moveFixedDiv, false);
<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="fixedDiv" style="top: 500px; left:100px;" class="fixed green composited"></div></div>