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

Unified Diff: third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp

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/animation/css/CSSAnimations.cpp
diff --git a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
index 39a15c6b8a3760c1ee1ebc041080462e0fe64027..289a723903c41a5273de44233a1e6b9633abb099 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
@@ -131,6 +131,9 @@ static StringKeyframeEffectModel* createKeyframeEffectModel(
("WebCore.Animation.CSSProperties"));
for (CSSPropertyID property : specifiedPropertiesForUseCounter) {
DCHECK(isValidCSSPropertyID(property));
+ UseCounter::countAnimatedCSS(elementForScoping->document(), property);
+
+ // TODO(crbug.com/458925): Remove legacy histogram and counts
propertyHistogram.sample(
UseCounter::mapCSSPropertyIdToCSSSampleIdForHistogram(property));
}
@@ -591,7 +594,9 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element) {
runningTransition.animation = animation;
m_transitions.set(id, runningTransition);
DCHECK(isValidCSSPropertyID(id));
+ UseCounter::countAnimatedCSS(element->document(), id);
+ // TODO(crbug.com/458925): Remove legacy histogram and counts
DEFINE_STATIC_LOCAL(SparseHistogram, propertyHistogram,
("WebCore.Animation.CSSProperties"));
propertyHistogram.sample(

Powered by Google App Engine
This is Rietveld 408576698