blob: 9bd89d737f8c53c909aaf27d6b07b671c9f38348 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
#red { position: absolute; background-color: red; width: 50px; height: 50px; top: 100px; left: 50px; }
#container { position: absolute; top: 300px; left: 300px; width: 100px; height: 100px; }
#region { -webkit-flow-from: flow; position: absolute; top: 100px; left: 100px; width: 200px; height: 200px; }
#target { width: 50px; height: 50px; background-color: green; top: 100px; left: 50px; }
</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 static positioned element, not collected into a named flow, that has its position changed to fixed
and collected into a named flow is positioned relative to the viewport instead of the region.
On success, you should see a green rectangle below.
-->
<div id="red"></div>
<div id="container">
<div id="target"></div>
</div>
<div id="region"></div>
<script>
function repaintTest() {
var target = document.getElementById("target");
target.style.position = "fixed";
target.style.webkitFlowInto = "flow";
}
</script>
</body>
</html>