blob: 8f6d2dcc7d8e5e1b520d15eeeebd48cf321efcf3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
#red { position: absolute; width: 50px; height: 50px; top: 200px; left: 150px; background-color: red; }
#region { -webkit-flow-from: flow; position: absolute; top: 100px; left: 100px; width: 200px; height: 200px; }
#target { -webkit-flow-into: flow; width: 50px; height: 50px; background-color: green; top: 100px; left: 50px; position: fixed; z-index: 0; }
</style>
<script src="../repaint/resources/text-based-repaint.js"></script>
</head>
<body onload="runRepaintTest()">
<!--
Test for WebKit bug: https://bugs.webkit.org/show_bug.cgi?id=111176
Test that a fixed positioned element, collected into a named flow, that has its position changed to absolute,
is positioned relative to the region instead of the viewport.
On success, you should see a green rectangle below.
-->
<div id="red"></div>
<div id="target"></div>
<div id="region"></div>
<script>
function repaintTest() {
document.getElementById("target").style.position = "absolute";
}
</script>
</body>
</html>