Index: Source/WebCore/rendering/RenderTableSection.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderTableSection.cpp (revision 115614) |
+++ Source/WebCore/rendering/RenderTableSection.cpp (working copy) |
@@ -161,11 +161,7 @@ |
return; |
} |
- RenderObject* row = new (renderArena()) RenderTableRow(document() /* anonymous table row */); |
- RefPtr<RenderStyle> newStyle = RenderStyle::create(); |
- newStyle->inheritFrom(style()); |
- newStyle->setDisplay(TABLE_ROW); |
- row->setStyle(newStyle.release()); |
+ RenderObject* row = RenderTableRow::createAnonymousWithParentRenderer(this); |
addChild(row, beforeChild); |
row->addChild(child); |
return; |
@@ -1417,4 +1413,14 @@ |
return it->second; |
} |
+RenderTableSection* RenderTableSection::createAnonymousWithParentRenderer(const RenderObject* parent) |
+{ |
+ RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style()); |
+ newStyle->setDisplay(TABLE_ROW_GROUP); |
+ |
+ RenderTableSection* newSection = new (parent->renderArena()) RenderTableSection(parent->document() /* is anonymous */); |
+ newSection->setStyle(newStyle.release()); |
+ return newSection; |
+} |
+ |
} // namespace WebCore |