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

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

Issue 1778463002: Remove special-code used by the old (removed) multicol implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | no next file » | 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 c32c6c3e22c69b550a061675f965e6477cd167b8..05c2ceeff1088e0c5fca8fad4a2d7d71378fda07 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -721,36 +721,18 @@ void LayoutBlock::removeChild(LayoutObject* oldChild)
LayoutBlockFlow* nextBlock = toLayoutBlockFlow(next);
LayoutBlockFlow* prevBlock = toLayoutBlockFlow(prev);
- if (prev->childrenInline() != next->childrenInline()) {
- LayoutBlock* inlineChildrenBlock = prev->childrenInline() ? prevBlock : nextBlock;
- LayoutBlock* blockChildrenBlock = prev->childrenInline() ? nextBlock : prevBlock;
-
- // Place the inline children block inside of the block children block instead of deleting it.
- ASSERT(!inlineChildrenBlock->continuation());
- bool inlineChildrenBlockHasLayer = inlineChildrenBlock->hasLayer();
- children()->removeChildNode(this, inlineChildrenBlock, inlineChildrenBlockHasLayer);
-
- // Now just put the inlineChildrenBlock inside the blockChildrenBlock.
- blockChildrenBlock->children()->insertChildNode(blockChildrenBlock, inlineChildrenBlock, prev == inlineChildrenBlock ? blockChildrenBlock->firstChild() : 0,
- inlineChildrenBlockHasLayer || blockChildrenBlock->hasLayer());
- next->setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalidationReason::AnonymousBlockChange);
-
- // inlineChildrenBlock got reparented to blockChildrenBlock, so it is no longer a child
- // of "this". we null out prev or next so that is not used later in the function.
- if (inlineChildrenBlock == prevBlock)
- prev = nullptr;
- else
- next = nullptr;
- } else {
- // Take all the children out of the |next| block and put them in
- // the |prev| block.
- nextBlock->moveAllChildrenIncludingFloatsTo(prevBlock, nextBlock->hasLayer() || prevBlock->hasLayer());
-
- // Delete the now-empty block's lines and nuke it.
- nextBlock->deleteLineBoxTree();
- nextBlock->destroy();
- next = nullptr;
- }
+ // If the inlineness of children of the two block don't match, we'd need special code here
+ // (but there should be no need for it).
+ ASSERT(nextBlock->childrenInline() == prevBlock->childrenInline());
+
+ // Take all the children out of the |next| block and put them in
+ // the |prev| block.
+ nextBlock->moveAllChildrenIncludingFloatsTo(prevBlock, nextBlock->hasLayer() || prevBlock->hasLayer());
+
+ // Delete the now-empty block's lines and nuke it.
+ nextBlock->deleteLineBoxTree();
+ nextBlock->destroy();
+ next = nullptr;
}
LayoutBox::removeChild(oldChild);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698