blob: 0ae45dfabc76f7e14e5a0c56c1b5160736d4fa50 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
.region { -webkit-flow-from: flow; position: absolute; top: 100px; left: 100px; width: 150px; height: 150px; }
.absolute { position: absolute; }
.fixed { position: fixed; }
#red { position: absolute; top: 150px; left: 150px; width: 50px; height: 50px; background-color: red; }
#absFromFixed { -webkit-flow-into: flow; top: 50px; left: 50px; width: 50px; height: 50px; background-color: green; }
</style>
<script>
if (window.internals)
window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true);
if (window.testRunner)
testRunner.dumpAsText();
window.addEventListener("load", function() {
document.getElementById("absFromFixed").className = "absolute";
if (window.internals)
document.getElementById("layerTree").innerText = window.internals.layerTreeAsText(document);
}, false);
</script>
</head>
<body>
<p>Test that a fixed positioned element that is dynamicaly changed to absolute is positioned relative to the first region instead of the viewport.</p>
<p>The fixed element should NOT be composited.</p>
<p>On success you should not see red below.</p>
<div id="red"></div>
<div class="region"></div>
<div id="absFromFixed" class="fixed"></div>
<pre id="layerTree"></pre>
</body>
</html>