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

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h

Issue 2759703003: DevTools: add support for polling for coverage data in CSS agent (Closed)
Patch Set: moved ranges sorting so it also works for CSS ranges Created 3 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: third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h b/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
index 1f76f55624680856b43774dec30bec17595c764f..7f8d2fa1399f310d3b35855c0a7e50b94f9136df 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
@@ -13,14 +13,18 @@ class StyleRule;
class StyleRuleUsageTracker : public GarbageCollected<StyleRuleUsageTracker> {
public:
- void track(StyleRule* rule) { m_ruleList.insert(rule); }
+ using RuleListByStyleSheet = HeapHashMap<Member<const CSSStyleSheet>,
+ HeapVector<Member<const StyleRule>>>;
- bool contains(StyleRule*) const;
+ void track(const CSSStyleSheet*, const StyleRule*);
+ RuleListByStyleSheet takeDelta();
DECLARE_TRACE();
private:
- HeapHashSet<Member<StyleRule>> m_ruleList;
+ HeapHashSet<std::pair<Member<const CSSStyleSheet>, Member<const StyleRule>>>
+ m_usedRules;
+ RuleListByStyleSheet m_usedRulesDelta;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698