blob: 839ad2e3c9a0d76b193185d16598496c035b3c19 [file] [log] [blame]
<!doctype html>
<html>
<head>
<script src="../js/resources/js-test-pre.js"></script>
</head>
<style>
#region {
-webkit-flow-from: flow;
}
</style>
<body>
<script>
description("Test offsetParent for body in a named flow.")
document.body.style.webkitFlowInto = "flow";
var article = document.createElement("div");
document.body.appendChild(article);
shouldBe("article.offsetParent", "document.body");
var chapter = document.createElement("div");
article.appendChild(chapter);
shouldBe("chapter.offsetParent", "document.body");
article.style.position = "relative";
shouldBe("chapter.offsetParent", "article");
var table = document.createElement("table");
document.body.appendChild(table);
var td = document.createElement("td");
table.appendChild(td);
var tdChild = document.createElement("div");
td.appendChild(tdChild);
shouldBe("tdChild.offsetParent", "td");
tdChild.style.webkitFlowInto = "flow";
shouldBe("tdChild.offsetParent", "document.body");
shouldBeNull("document.body.offsetParent");
document.body.style.webkitFlowInto = null;
</script>
<script src="../js/resources/js-test-post.js"></script>
<div id="region"/>
</body>
</html>