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

Unified Diff: Source/core/animation/Animation.cpp

Issue 199743003: Web Animation API: Add use counter for Animation constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@APIUseCounter
Patch Set: Rebased onto updated parent branch Created 6 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
« no previous file with comments | « no previous file | Source/core/frame/UseCounter.h » ('j') | Source/core/frame/UseCounter.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Animation.cpp
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp
index f43bbb2644007abfc66f591b765189c21e3dd156..8b1bef214bb5a72c5ab83999e58ebeee5be34904 100644
--- a/Source/core/animation/Animation.cpp
+++ b/Source/core/animation/Animation.cpp
@@ -39,6 +39,7 @@
#include "core/animation/KeyframeEffectModel.h"
#include "core/animation/Player.h"
#include "core/dom/Element.h"
+#include "core/frame/UseCounter.h"
#include "core/rendering/RenderLayer.h"
namespace WebCore {
@@ -66,16 +67,19 @@ PassRefPtr<Animation> Animation::create(Element* element, PassRefPtrWillBeRawPtr
PassRefPtr<Animation> Animation::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, const Dictionary& timingInputDictionary)
{
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
+ UseCounter::count(element->document(), UseCounter::NewAnimationKeyframeListEffectObjectTiming);
return create(element, EffectInput::convert(element, keyframeDictionaryVector), TimingInput::convert(timingInputDictionary));
}
PassRefPtr<Animation> Animation::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, double duration)
{
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
+ UseCounter::count(element->document(), UseCounter::NewAnimationKeyframeListEffectDoubleTiming);
return create(element, EffectInput::convert(element, keyframeDictionaryVector), TimingInput::convert(duration));
}
PassRefPtr<Animation> Animation::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector)
{
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
+ UseCounter::count(element->document(), UseCounter::NewAnimationKeyframeListEffectNoTiming);
return create(element, EffectInput::convert(element, keyframeDictionaryVector), Timing());
}
« no previous file with comments | « no previous file | Source/core/frame/UseCounter.h » ('j') | Source/core/frame/UseCounter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698