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

Unified Diff: third_party/WebKit/Source/core/frame/UseCounter.h

Issue 2678143003: Move CSS animations use counters to UseCounter (Closed)
Patch Set: Replace FIXME with test expectation file Created 3 years, 10 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/frame/UseCounter.h
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.h b/third_party/WebKit/Source/core/frame/UseCounter.h
index 1f8c0e9be35932fe10fdd6ee5e8b0011021eede4..79f5696150cf56e82e7480a798ff2ac09edc20f0 100644
--- a/third_party/WebKit/Source/core/frame/UseCounter.h
+++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -1502,6 +1502,9 @@ class CORE_EXPORT UseCounter {
void count(CSSParserMode, CSSPropertyID);
void count(Feature);
+ static void countAnimatedCSS(const Document&, CSSPropertyID);
+ void countAnimatedCSS(CSSPropertyID);
+
// Count only features if they're being used in an iframe which does not
// have script access into the top level document.
static void countCrossOriginIframe(const Document&, Feature);
@@ -1514,6 +1517,11 @@ class CORE_EXPORT UseCounter {
static bool isCounted(Document&, const String&);
bool isCounted(CSSPropertyID unresolvedProperty);
+ // Return whether the CSSPropertyID was previously counted for this document.
+ // NOTE: only for use in testing.
+ static bool isCountedAnimatedCSS(Document&, const String&);
+ bool isCountedAnimatedCSS(CSSPropertyID unresolvedProperty);
+
// Retains a reference to the observer to notify of UseCounter changes.
void addObserver(Observer*);
@@ -1543,6 +1551,7 @@ class CORE_EXPORT UseCounter {
EnumerationHistogram& featuresHistogram() const;
EnumerationHistogram& cssHistogram() const;
+ EnumerationHistogram& animatedCSSHistogram() const;
// If non-zero, ignore all 'count' calls completely.
unsigned m_muteCount;
@@ -1557,6 +1566,7 @@ class CORE_EXPORT UseCounter {
// histograms.
BitVector m_featuresRecorded;
BitVector m_CSSRecorded;
+ BitVector m_animatedCSSRecorded;
HeapHashSet<Member<Observer>> m_observers;

Powered by Google App Engine
This is Rietveld 408576698