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

Unified Diff: Source/core/rendering/RenderBlock.cpp

Issue 111873005: ASSERTION FAILED: !object || object->isTable() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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
Index: Source/core/rendering/RenderBlock.cpp
diff --git a/Source/core/rendering/RenderBlock.cpp b/Source/core/rendering/RenderBlock.cpp
index 17b01671130324d95200dc9288aba0cf605ab528..b8ebada22a6dd0432dc51a8812e8c37c857c8e9b 100644
--- a/Source/core/rendering/RenderBlock.cpp
+++ b/Source/core/rendering/RenderBlock.cpp
@@ -709,6 +709,10 @@ RenderBlockFlow* RenderBlock::columnsBlockForSpanningElement(RenderObject* newCh
void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObject* beforeChild)
{
+ // FIXME: We should NEVER hit this code path for tables as they should go through RenderTable::addChild
+ // to add the appropriate anonymous wrappers. Unfortunately a lot of callers call this method directly
+ // (bypassing the virtual addChild), which means we can't enforce this before cleaning them up.
+
if (beforeChild && beforeChild->parent() != this) {
RenderObject* beforeChildContainer = beforeChild->parent();
while (beforeChildContainer->parent() != this)
@@ -809,13 +813,19 @@ void RenderBlock::addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild,
if (newChild->isInline()) {
// No suitable existing anonymous box - create a new one.
RenderBlock* newBox = createAnonymousBlock();
- RenderBox::addChild(newBox, beforeChild);
+ if (isTable())
+ toRenderTable(this)->addChild(newBox, beforeChild);
+ else
+ RenderBox::addChild(newBox, beforeChild);
newBox->addChild(newChild);
return;
}
}
- RenderBox::addChild(newChild, beforeChild);
+ if (isTable())
+ toRenderTable(this)->addChild(newChild, beforeChild);
+ else
+ RenderBox::addChild(newChild, beforeChild);
if (madeBoxesNonInline && parent() && isAnonymousBlock() && parent()->isRenderBlock())
toRenderBlock(parent())->removeLeftoverAnonymousBlock(this);

Powered by Google App Engine
This is Rietveld 408576698