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

Unified Diff: Source/core/css/invalidation/StyleSheetInvalidationAnalysis.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
« no previous file with comments | « Source/core/css/invalidation/StyleInvalidator.cpp ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
diff --git a/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp b/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
index e3827ef3a9124ac725e43e4cb5cdf64a820c6244..25d018ab7cce351774e0e189430d9449afebb142 100644
--- a/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
+++ b/Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
@@ -196,7 +196,7 @@ void StyleSheetInvalidationAnalysis::invalidateStyle(Document& document)
if (!m_scopingNodes.isEmpty()) {
for (unsigned i = 0; i < m_scopingNodes.size(); ++i)
- m_scopingNodes.at(i)->setNeedsStyleRecalc(SubtreeStyleChange);
+ m_scopingNodes.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange));
}
if (m_idScopes.isEmpty() && m_classScopes.isEmpty())
@@ -204,7 +204,7 @@ void StyleSheetInvalidationAnalysis::invalidateStyle(Document& document)
Element* element = ElementTraversal::firstWithin(document);
while (element) {
if (elementMatchesSelectorScopes(element, m_idScopes, m_classScopes)) {
- element->setNeedsStyleRecalc(SubtreeStyleChange);
+ element->setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::create(StyleChangeReason::StyleSheetChange));
// The whole subtree is now invalidated, we can skip to the next sibling.
element = ElementTraversal::nextSkippingChildren(*element);
continue;
« no previous file with comments | « Source/core/css/invalidation/StyleInvalidator.cpp ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698