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

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: 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
Index: Source/core/layout/LayoutObjectChildList.cpp
diff --git a/Source/core/layout/LayoutObjectChildList.cpp b/Source/core/layout/LayoutObjectChildList.cpp
index 4a37b6168f7a3ac4b5186bdd145e01e597719f1f..b5159b233b40d8b481919f215730b387a812a3f1 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::DomChanged);
esprehn 2015/03/23 20:19:44 This doesn't mean the dom changed, it could just m
pdr. 2015/03/24 03:56:19 Good catch. I updated this to be "RemovedFromLayo
invalidatePaintOnRemoval(*oldChild);
}
}
@@ -156,7 +156,7 @@ void LayoutObjectChildList::insertChildNode(LayoutObject* owner, LayoutObject* n
LayoutCounter::rendererSubtreeAttached(newChild);
}
- newChild->setNeedsLayoutAndPrefWidthsRecalc();
+ newChild->setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::DomChanged);
esprehn 2015/03/23 20:19:44 This doesn't mean the dom changed, it could just m
newChild->setShouldDoFullPaintInvalidation(PaintInvalidationRendererInsertion);
if (!owner->normalChildNeedsLayout())
owner->setChildNeedsLayout(); // We may supply the static position for an absolute positioned child.

Powered by Google App Engine
This is Rietveld 408576698