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

Unified Diff: Source/core/css/invalidation/StyleInvalidator.cpp

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: use AtomicString Created 6 years, 3 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/css/invalidation/StyleInvalidator.cpp
diff --git a/Source/core/css/invalidation/StyleInvalidator.cpp b/Source/core/css/invalidation/StyleInvalidator.cpp
index e237c9ae1a70081d237e993b3b6c134eea328f2d..cefc3d7b17650398f523f56d1e6adc0d4ec46b8d 100644
--- a/Source/core/css/invalidation/StyleInvalidator.cpp
+++ b/Source/core/css/invalidation/StyleInvalidator.cpp
@@ -145,13 +145,13 @@ bool StyleInvalidator::invalidate(Element& element, StyleInvalidator::RecursionD
someChildrenNeedStyleRecalc = invalidateChildren(element, recursionData);
if (thisElementNeedsStyleRecalc) {
- element.setNeedsStyleRecalc(recursionData.wholeSubtreeInvalid() ? SubtreeStyleChange : LocalStyleChange);
+ element.setNeedsStyleRecalc(recursionData.wholeSubtreeInvalid() ? SubtreeStyleChange : LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator));
} else if (recursionData.hasInvalidationSets() && someChildrenNeedStyleRecalc) {
// Clone the RenderStyle in order to preserve correct style sharing, if possible. Otherwise recalc style.
if (RenderObject* renderer = element.renderer())
renderer->setStyleInternal(RenderStyle::clone(renderer->style()));
else
- element.setNeedsStyleRecalc(LocalStyleChange);
+ element.setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleInvalidator));
}
element.clearChildNeedsStyleInvalidation();
« no previous file with comments | « Source/core/css/PropertySetCSSStyleDeclaration.cpp ('k') | Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698