Index: Source/WebCore/rendering/RenderObject.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderObject.cpp (revision 95468) |
+++ Source/WebCore/rendering/RenderObject.cpp (working copy) |
@@ -283,6 +283,17 @@ |
if (!children) |
return; |
+ RenderObject* beforeContent = 0; |
+ bool beforeChildHasBeforeAndAfterContent = false; |
+ if (beforeChild && (beforeChild->isTable() || beforeChild->isTableSection() || beforeChild->isTableRow())) { |
+ beforeContent = beforeChild->findBeforeContentRenderer(); |
+ RenderObject* afterContent = beforeChild->findAfterContentRenderer(); |
+ if (beforeContent && afterContent) { |
+ beforeChildHasBeforeAndAfterContent = true; |
+ beforeContent->destroy(); |
+ } |
+ } |
+ |
bool needsTable = false; |
if (newChild->isTableCol() && newChild->style()->display() == TABLE_COLUMN_GROUP) |
@@ -321,11 +332,15 @@ |
// Just add it... |
children->insertChildNode(this, newChild, beforeChild); |
} |
+ |
if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE) { |
RefPtr<StringImpl> textToTransform = toRenderText(newChild)->originalText(); |
if (textToTransform) |
toRenderText(newChild)->setText(textToTransform.release(), true); |
} |
+ |
+ if (beforeChildHasBeforeAndAfterContent) |
+ children->updateBeforeAfterContent(this, BEFORE); |
} |
void RenderObject::removeChild(RenderObject* oldChild) |