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

Unified Diff: Source/core/layout/LayoutText.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/LayoutText.cpp
diff --git a/Source/core/layout/LayoutText.cpp b/Source/core/layout/LayoutText.cpp
index adbed654d63954dbd75048ddaf2af4525146fb97..6460bd458fbe9fb100b07e6046de0f201e265347 100644
--- a/Source/core/layout/LayoutText.cpp
+++ b/Source/core/layout/LayoutText.cpp
@@ -190,7 +190,7 @@ void LayoutText::styleDidChange(StyleDifference diff, const LayoutStyle* oldStyl
// We do have to schedule layouts, though, since a style change can force us to
// need to relayout.
if (diff.needsFullLayout()) {
- setNeedsLayoutAndPrefWidthsRecalc();
+ setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::StyleChange);
m_knownToHaveNoOverflowAndNoFallbackFonts = false;
}
@@ -1431,7 +1431,7 @@ void LayoutText::setText(PassRefPtr<StringImpl> text, bool force)
// insertChildNode() fails to set true to owner. To avoid that, we call
// setNeedsLayoutAndPrefWidthsRecalc() only if this LayoutText has parent.
if (parent())
- setNeedsLayoutAndPrefWidthsRecalc();
+ setNeedsLayoutAndPrefWidthsRecalc(LayoutInvalidationReason::TextChanged);
m_knownToHaveNoOverflowAndNoFallbackFonts = false;
if (AXObjectCache* cache = document().existingAXObjectCache())

Powered by Google App Engine
This is Rietveld 408576698