Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Unified Diff: Source/WebCore/rendering/RenderObject.cpp

Issue 7946014: Merge 95461 - Child not placed correctly when beforeChild (table part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | Source/WebCore/rendering/RenderTable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/WebCore/rendering/RenderObject.h ('k') | Source/WebCore/rendering/RenderTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698