Upstream version 5.34.98.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / fast / regions / cssom / offsetParent-in-flow-thread.html
1 <!doctype html>
2 <html>
3     <head>
4         <script src="../../../resources/js-test.js"></script>
5     </head>
6     <body>
7         <script>
8             description("Test offsetParent for elements inside a named flow.")
9
10             var article = document.createElement("div");
11             document.body.appendChild(article);
12             article.style.webkitFlowInto = "flow";
13             shouldBe("article.offsetParent", "document.body");
14
15             var chapter = document.createElement("div");
16             article.appendChild(chapter);
17             shouldBe("chapter.offsetParent", "document.body");
18
19             article.style.position = "relative";
20             shouldBe("chapter.offsetParent", "article");
21
22             var table = document.createElement("table");
23             document.body.appendChild(table);
24
25             var td = document.createElement("td");
26             table.appendChild(td);
27
28             var tdChild = document.createElement("div");
29             td.appendChild(tdChild);
30             shouldBe("tdChild.offsetParent", "td");
31
32             tdChild.style.webkitFlowInto = "flow";
33             shouldBe("tdChild.offsetParent", "document.body");
34
35             shouldBeNull("document.body.offsetParent");
36         </script>
37     </body>
38 </html>
39