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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlock.cpp

Issue 1970453002: Move continuation and line box specific stuff to LayoutBlockFlow::removeChild(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutBlock.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
index bc46a2b38b836012f8081342507ed02f5b264f16..aab1e93956624945caa3ac606080b8f78bfefb3f 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -705,41 +705,6 @@ void LayoutBlock::removeChild(LayoutObject* oldChild)
// box.
collapseAnonymousBlockChild(this, toLayoutBlock(child));
}
-
- if (!firstChild()) {
- // If this was our last child be sure to clear out our line boxes.
- if (childrenInline())
- deleteLineBoxTree();
-
- // If we are an empty anonymous block in the continuation chain,
- // we need to remove ourself and fix the continuation chain.
- if (!beingDestroyed() && isAnonymousBlockContinuation() && !oldChild->isListMarker()) {
- LayoutObject* containingBlockIgnoringAnonymous = containingBlock();
- while (containingBlockIgnoringAnonymous && containingBlockIgnoringAnonymous->isAnonymous())
- containingBlockIgnoringAnonymous = containingBlockIgnoringAnonymous->containingBlock();
- for (LayoutObject* curr = this; curr; curr = curr->previousInPreOrder(containingBlockIgnoringAnonymous)) {
- if (curr->virtualContinuation() != this)
- continue;
-
- // Found our previous continuation. We just need to point it to
- // |this|'s next continuation.
- LayoutBoxModelObject* nextContinuation = continuation();
- if (curr->isLayoutInline())
- toLayoutInline(curr)->setContinuation(nextContinuation);
- else if (curr->isLayoutBlock())
- toLayoutBlock(curr)->setContinuation(nextContinuation);
- else
- ASSERT_NOT_REACHED();
-
- break;
- }
- setContinuation(nullptr);
- destroy();
- }
- } else if (!beingDestroyed() && !oldChild->isFloatingOrOutOfFlowPositioned() && isLayoutBlockFlow() && !oldChild->isAnonymousBlock()) {
- // If the child we're removing means that we can now treat all children as inline without the need for anonymous blocks, then do that.
- makeChildrenInlineIfPossible();
- }
}
void LayoutBlock::startDelayUpdateScrollInfo()
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698