Index: Source/WebCore/rendering/RenderTableRow.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderTableRow.cpp (revision 115614) |
+++ Source/WebCore/rendering/RenderTableRow.cpp (working copy) |
@@ -113,11 +113,7 @@ |
return; |
} |
- RenderTableCell* cell = new (renderArena()) RenderTableCell(document() /* anonymous object */); |
- RefPtr<RenderStyle> newStyle = RenderStyle::create(); |
- newStyle->inheritFrom(style()); |
- newStyle->setDisplay(TABLE_CELL); |
- cell->setStyle(newStyle.release()); |
+ RenderTableCell* cell = RenderTableCell::createAnonymousWithParentRenderer(this); |
addChild(cell, beforeChild); |
cell->addChild(child); |
return; |
@@ -249,4 +245,14 @@ |
repaint(); |
} |
+RenderTableRow* RenderTableRow::createAnonymousWithParentRenderer(const RenderObject* parent) |
+{ |
+ RefPtr<RenderStyle> newStyle = RenderStyle::createAnonymousStyle(parent->style()); |
+ newStyle->setDisplay(TABLE_ROW); |
+ |
+ RenderTableRow* newRow = new (parent->renderArena()) RenderTableRow(parent->document() /* is anonymous */); |
+ newRow->setStyle(newStyle.release()); |
+ return newRow; |
+} |
+ |
} // namespace WebCore |