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

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

Issue 869583002: [New Multicolumn] Support dynamic insertion and removal of multicol content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: code review Created 5 years, 11 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/core/rendering/RenderMultiColumnSpannerPlaceholder.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index 5d8e90a90bdfd12a89e2345c62a2b50acd18563b..c0fa1a1b4f2cbf6f4ce65cbeb0ca148a26fc2791 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -2400,7 +2400,12 @@ void RenderObject::removeFromRenderFlowThread()
// It's only until later when we actually destroy it and remove all the children from it.
// Currently, that happens for firstLetter elements and list markers.
// Pass in the flow thread so that we don't have to look it up for all the children.
- removeFromRenderFlowThreadRecursive(flowThreadContainingBlock());
+ // If we're a column spanner, we need to use our parent to find the flow thread, since a spanner
+ // doesn't have the flow thread in its containing block chain. We still need to notify the flow
+ // thread when the renderer removed happens to be a spanner, so that we get rid of the spanner
+ // placeholder, and column sets around the placeholder get merged.
+ RenderFlowThread* flowThread = isColumnSpanAll() ? parent()->flowThreadContainingBlock() : flowThreadContainingBlock();
+ removeFromRenderFlowThreadRecursive(flowThread);
}
void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderFlowThread)
@@ -2413,6 +2418,7 @@ void RenderObject::removeFromRenderFlowThreadRecursive(RenderFlowThread* renderF
if (renderFlowThread && renderFlowThread != this)
renderFlowThread->flowThreadDescendantWillBeRemoved(this);
setFlowThreadState(NotInsideFlowThread);
+ RELEASE_ASSERT(!spannerPlaceholder());
}
void RenderObject::destroyAndCleanupAnonymousWrappers()
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSpannerPlaceholder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698