LayoutTests:
Reviewed by Hyatt.
- test for <rdar://problem/4928671> Crash due to runaway recursion when fieldset has display: table-row (12066)
* fast/css/fieldset-display-row-expected.checksum: Added.
* fast/css/fieldset-display-row-expected.png: Added.
* fast/css/fieldset-display-row-expected.txt: Added.
* fast/css/fieldset-display-row.html: Added.
WebCore:
Reviewed by Hyatt.
- fix <rdar://problem/4928671> Crash due to runaway recursion when fieldset has display: table-row (12066)
Test: fast/css/fieldset-display-row.html
* rendering/RenderContainer.cpp: (WebCore::RenderContainer::addChild):
Change all decision making about special handling for new children to use
the class of the render object instead of the style, except for the cases
where the style is the only way to tell (TABLE_COLUMN_GROUP and TABLE_CAPTION).
Thus a RenderFieldset with table-row style won't get handled as if it was
a table row.
* rendering/RenderTable.cpp: (WebCore::RenderTable::addChild): Same thing.
Except that here the styles that we ahave to look at are TABLE_CAPTION,
TABLE_HEADER_GROUP, TABLE_FOOTER_GROUP, and TABLE_ROW_GROUP.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@21520 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/css/fieldset-display-row.html b/LayoutTests/fast/css/fieldset-display-row.html
new file mode 100644
index 0000000..7ef5cff
--- /dev/null
+++ b/LayoutTests/fast/css/fieldset-display-row.html
@@ -0,0 +1,11 @@
+<html>
+<head>
+ <title>Test HTML Page</title>
+ <style type="text/css">
+ fieldset { display: table-row; }
+ </style>
+</head>
+<body>
+ <fieldset>If you can see this fieldset without crashing, then all is well.</fieldset>
+</body>
+</html>