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

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

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 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 | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/layout/LayoutReplaced.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObjectChildList.cpp
diff --git a/Source/core/layout/LayoutObjectChildList.cpp b/Source/core/layout/LayoutObjectChildList.cpp
index d317d1f4871a16fd46ac0563eb3292b77000c82f..ba2aecaa446a7dfc716ea310411101a0f4af2f47 100644
--- a/Source/core/layout/LayoutObjectChildList.cpp
+++ b/Source/core/layout/LayoutObjectChildList.cpp
@@ -65,7 +65,7 @@ LayoutObject* LayoutObjectChildList::removeChildNode(LayoutObject* owner, Layout
// 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() && notifyRenderer && oldChild->everHadLayout()) {
- oldChild->setNeedsLayoutAndPrefWidthsRecalc();
+ oldChild->setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::RemovedFromLayout);
invalidatePaintOnRemoval(*oldChild);
}
}
@@ -156,7 +156,7 @@ void LayoutObjectChildList::insertChildNode(LayoutObject* owner, LayoutObject* n
LayoutCounter::rendererSubtreeAttached(newChild);
}
- newChild->setNeedsLayoutAndPrefWidthsRecalc();
+ newChild->setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::AddedToLayout);
newChild->setShouldDoFullPaintInvalidation(PaintInvalidationRendererInsertion);
if (!owner->normalChildNeedsLayout())
owner->setChildNeedsLayout(); // We may supply the static position for an absolute positioned child.
« no previous file with comments | « Source/core/layout/LayoutObject.cpp ('k') | Source/core/layout/LayoutReplaced.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698