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

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

Issue 2160723006: Ensure invalidation in LayoutBlockChildNode::removeChildNodes() without notifyLayoutObject (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adjust comment Created 4 years, 5 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 | « third_party/WebKit/LayoutTests/paint/invalidation/remove-anonymous-block-crash-expected.txt ('k') | 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/LayoutObjectChildList.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp b/third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp
index e88385e0600c47a21b2fb98ea209e0a697e9aef4..4bb896684747d7430ab8b38242f58e9f1638f755 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObjectChildList.cpp
@@ -57,21 +57,19 @@ LayoutObject* LayoutObjectChildList::removeChildNode(LayoutObject* owner, Layout
if (oldChild->isFloatingOrOutOfFlowPositioned())
toLayoutBox(oldChild)->removeFloatingOrPositionedChildFromBlockLists();
- {
+ if (!owner->documentBeingDestroyed()) {
// So that we'll get the appropriate dirty bit set (either that a normal flow child got yanked or
// that a positioned child got yanked). We also issue paint invalidations, so that the area exposed when the child
// disappears gets paint invalidated properly.
- if (!owner->documentBeingDestroyed() && notifyLayoutObject && oldChild->everHadLayout()) {
+ if (notifyLayoutObject && oldChild->everHadLayout())
oldChild->setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::RemovedFromLayout);
- invalidatePaintOnRemoval(*oldChild);
- }
+ invalidatePaintOnRemoval(*oldChild);
}
// If we have a line box wrapper, delete it.
if (oldChild->isBox())
toLayoutBox(oldChild)->deleteLineBoxWrapper();
-
if (!owner->documentBeingDestroyed()) {
// If oldChild is the start or end of the selection, then clear the selection to
// avoid problems of invalid pointers.
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/invalidation/remove-anonymous-block-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698