| OLD | NEW |
| (Empty) |
| 1 <!doctype html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../resources/js-test.js"></script> | |
| 5 </head> | |
| 6 | |
| 7 <style> | |
| 8 | |
| 9 #region { | |
| 10 -webkit-flow-from: flow; | |
| 11 } | |
| 12 | |
| 13 </style> | |
| 14 | |
| 15 <body> | |
| 16 <script> | |
| 17 description("Test offsetParent for body in a named flow.") | |
| 18 | |
| 19 document.body.style.webkitFlowInto = "flow"; | |
| 20 | |
| 21 var article = document.createElement("div"); | |
| 22 document.body.appendChild(article); | |
| 23 shouldBe("article.offsetParent", "document.body"); | |
| 24 | |
| 25 var chapter = document.createElement("div"); | |
| 26 article.appendChild(chapter); | |
| 27 shouldBe("chapter.offsetParent", "document.body"); | |
| 28 | |
| 29 article.style.position = "relative"; | |
| 30 shouldBe("chapter.offsetParent", "article"); | |
| 31 | |
| 32 var table = document.createElement("table"); | |
| 33 document.body.appendChild(table); | |
| 34 | |
| 35 var td = document.createElement("td"); | |
| 36 table.appendChild(td); | |
| 37 | |
| 38 var tdChild = document.createElement("div"); | |
| 39 td.appendChild(tdChild); | |
| 40 shouldBe("tdChild.offsetParent", "td"); | |
| 41 | |
| 42 tdChild.style.webkitFlowInto = "flow"; | |
| 43 shouldBe("tdChild.offsetParent", "document.body"); | |
| 44 | |
| 45 shouldBeNull("document.body.offsetParent"); | |
| 46 | |
| 47 document.body.style.webkitFlowInto = null; | |
| 48 </script> | |
| 49 | |
| 50 <div id="region"/> | |
| 51 </body> | |
| 52 </html> | |
| 53 | |
| OLD | NEW |