4 <script src="../../../resources/js-test.js"></script>
8 description("Test offsetParent for elements inside a named flow.")
10 var article = document.createElement("div");
11 document.body.appendChild(article);
12 article.style.webkitFlowInto = "flow";
13 shouldBe("article.offsetParent", "document.body");
15 var chapter = document.createElement("div");
16 article.appendChild(chapter);
17 shouldBe("chapter.offsetParent", "document.body");
19 article.style.position = "relative";
20 shouldBe("chapter.offsetParent", "article");
22 var table = document.createElement("table");
23 document.body.appendChild(table);
25 var td = document.createElement("td");
26 table.appendChild(td);
28 var tdChild = document.createElement("div");
29 td.appendChild(tdChild);
30 shouldBe("tdChild.offsetParent", "td");
32 tdChild.style.webkitFlowInto = "flow";
33 shouldBe("tdChild.offsetParent", "document.body");
35 shouldBeNull("document.body.offsetParent");