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

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: 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..da4b0e9832bfa00cb29ec447fdd92916b7cad67b 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleRuleUsageTracker.h
@@ -13,14 +13,17 @@ class StyleRule;
class StyleRuleUsageTracker : public GarbageCollected<StyleRuleUsageTracker> {
public:
- void track(StyleRule* rule) { m_ruleList.insert(rule); }
-
- bool contains(StyleRule*) const;
+ void track(StyleRule* rule) {
+ if (m_ruleList.insert(rule).isNewEntry)
+ m_ruleListDelta.push_back(rule);
+ }
+ HeapVector<Member<StyleRule>> takeDelta();
DECLARE_TRACE();
private:
HeapHashSet<Member<StyleRule>> m_ruleList;
+ HeapVector<Member<StyleRule>> m_ruleListDelta;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698