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

Unified Diff: third_party/WebKit/Source/core/css/ElementRuleCollector.cpp

Issue 2455943003: Backend for css rule tracking (Closed)
Patch Set: Backend for CSS Rule tracking. Created 4 years, 1 month 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: third_party/WebKit/Source/core/css/ElementRuleCollector.cpp
diff --git a/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp b/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp
index ef1bc2f4ee9c88cece4673713c6a9176823025c9..c77c0da1d62db403fadcb59e1dff9bc28c9c21cd 100644
--- a/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp
+++ b/third_party/WebKit/Source/core/css/ElementRuleCollector.cpp
@@ -41,10 +41,10 @@
#include "core/css/StylePropertySet.h"
#include "core/css/resolver/StyleResolver.h"
#include "core/css/resolver/StyleResolverStats.h"
+#include "core/css/resolver/StyleRuleUsageTracker.h"
#include "core/dom/StyleEngine.h"
#include "core/dom/shadow/ShadowRoot.h"
#include "core/style/StyleInheritedData.h"
-#include <algorithm>
namespace blink {
@@ -371,4 +371,10 @@ bool ElementRuleCollector::hasAnyMatchingRules(RuleSet* ruleSet) {
return !m_matchedRules.isEmpty();
}
+void ElementRuleCollector::addMatchedRulesToTracker(
+ StyleRuleUsageTracker* tracker) const {
+ for (auto matchedRule : m_matchedRules)
+ tracker->track(matchedRule.ruleData()->rule());
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/ElementRuleCollector.h ('k') | third_party/WebKit/Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698