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

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

Issue 1968403002: LayoutBlock::removeChild() override no longer needed. (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
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 377bd5f9b16e91611a1d9f95c57d1609e5d6595c..a9be0f768b3f6c4b3eb3f2f05e9061b4207391a2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.cpp
@@ -644,39 +644,6 @@ void LayoutBlock::collapseAnonymousBlockChild(LayoutBlock* parent, LayoutBlock*
child->destroy();
}
-void LayoutBlock::removeChild(LayoutObject* oldChild)
-{
- // No need to waste time in merging or removing empty anonymous blocks.
- // We can just bail out if our document is getting destroyed.
- if (documentBeingDestroyed()) {
- LayoutBox::removeChild(oldChild);
- return;
- }
-
- // If this child is a block, and if our previous and next siblings are
- // both anonymous blocks with inline content, then we can go ahead and
- // fold the inline content back together.
- LayoutObject* prev = oldChild->previousSibling();
- LayoutObject* next = oldChild->nextSibling();
- bool mergedAnonymousBlocks = false;
- if (prev && next && !oldChild->isInline() && !oldChild->virtualContinuation() && prev->isLayoutBlockFlow() && next->isLayoutBlockFlow()) {
- if (toLayoutBlockFlow(prev)->mergeSiblingContiguousAnonymousBlock(toLayoutBlockFlow(next))) {
- mergedAnonymousBlocks = true;
- next = nullptr;
- }
- }
-
- LayoutBox::removeChild(oldChild);
-
- LayoutObject* child = prev ? prev : next;
- if (mergedAnonymousBlocks && child && !child->previousSibling() && !child->nextSibling()) {
- // The removal has knocked us down to containing only a single anonymous
- // box. We can go ahead and pull the content right back up into our
- // box.
- collapseAnonymousBlockChild(this, toLayoutBlock(child));
- }
-}
-
void LayoutBlock::startDelayUpdateScrollInfo()
{
if (gDelayUpdateScrollInfo == 0) {
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBlock.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698