2 Test for
<i><a href=
"http://bugs.webkit.org/show_bug.cgi?id=15362">http://bugs.webkit.org/show_bug.cgi?id=
15362</a>
3 Safari Crashes when opening a JS TreeGrid widget
</i>.
6 The test sets up an inline parent with a child that is some kind of table part. The child gets broken off into a continuation and anonymous table parts get created below and/or above the table parts. Then the test tries to insert a new child into the inline, specifying the table part as the
"before child". The resulting render tree should look just like it would look if the parent was a block.
9 function test(display
, element
)
13 var inline
= document
.createElement("span");
14 inline
.appendChild(document
.createTextNode("Text..."));
15 var beforeChild
= inline
.appendChild(document
.createElement("div"));
16 beforeChild
.style
.display
= display
;
17 beforeChild
.appendChild(document
.createTextNode("...continues here"));
18 document
.body
.appendChild(document
.createElement("div")).appendChild(inline
);
21 var newChild
= element
? document
.createElement(element
) : document
.createTextNode("goes here and");
22 inline
.insertBefore(newChild
, beforeChild
);
26 test("table-cell", "td");
27 test("table-cell", "tr");
28 test("table-cell", "span");
29 test("table-cell", "div");
32 test("table-row", "td");
33 test("table-row", "tr");
34 test("table-row", "span");
35 test("table-row", "div");
37 test("table-row-group");
38 test("table-row-group", "td");
39 test("table-row-group", "tr");
40 test("table-row-group", "span");
41 test("table-row-group", "div");