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

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

Issue 2678143003: Move CSS animations use counters to UseCounter (Closed)
Patch Set: Rebase incl FrameHost->Page change, tweak test 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/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 3f8a3c397b9cc3f5c53f53223d7f6ef5979c5e81..e9275aa80cb898f4d9e71504bde502157077045d 100644
--- a/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
+++ b/third_party/WebKit/Source/core/animation/css/CSSAnimations.cpp
@@ -134,6 +134,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));
}
@@ -602,7 +605,9 @@ void CSSAnimations::maybeApplyPendingUpdate(Element* element) {
runningTransition.animation = animation;
m_transitions.set(property, runningTransition);
DCHECK(isValidCSSPropertyID(property.cssProperty()));
+ UseCounter::countAnimatedCSS(element->document(), property.cssProperty());
+ // 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