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

Unified Diff: Source/core/animation/ElementAnimation.h

Issue 947923002: Add AnimationTimingProperties dictionary (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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: Source/core/animation/ElementAnimation.h
diff --git a/Source/core/animation/ElementAnimation.h b/Source/core/animation/ElementAnimation.h
index 8798446e455721e07d3d588876fd8dd2e0301e97..4bd8a07f957c7ff09244c8b94b86edd853f3764a 100644
--- a/Source/core/animation/ElementAnimation.h
+++ b/Source/core/animation/ElementAnimation.h
@@ -31,6 +31,7 @@
#ifndef ElementAnimation_h
#define ElementAnimation_h
+#include "bindings/core/v8/UnionTypesCore.h"
#include "core/animation/ActiveAnimations.h"
#include "core/animation/Animation.h"
#include "core/animation/AnimationTimeline.h"
@@ -47,46 +48,28 @@ class Dictionary;
class ElementAnimation {
public:
- static AnimationPlayer* animate(Element& element, PassRefPtrWillBeRawPtr<AnimationEffect> effect, const Dictionary& timingInputDictionary)
+ static AnimationPlayer* animate(Element& element, const AnimationEffectOrDictionarySequence& effectInput, double duration, ExceptionState& exceptionState)
{
- return animateInternal(element, effect, TimingInput::convert(timingInputDictionary));
- }
-
- static AnimationPlayer* animate(Element& element, PassRefPtrWillBeRawPtr<AnimationEffect> effect, double duration)
- {
- return animateInternal(element, effect, TimingInput::convert(duration));
- }
-
- static AnimationPlayer* animate(Element& element, PassRefPtrWillBeRawPtr<AnimationEffect> effect)
- {
- return animateInternal(element, effect, Timing());
- }
-
- static AnimationPlayer* animate(Element& element, const Vector<Dictionary>& keyframeDictionaryVector, const Dictionary& timingInputDictionary, ExceptionState& exceptionState)
- {
- RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, keyframeDictionaryVector, exceptionState);
+ RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, effectInput, exceptionState);
if (exceptionState.hadException())
return 0;
- ASSERT(effect);
- return animateInternal(element, effect.release(), TimingInput::convert(timingInputDictionary));
+ return animateInternal(element, effect, TimingInput::convert(duration));
}
- static AnimationPlayer* animate(Element& element, const Vector<Dictionary>& keyframeDictionaryVector, double duration, ExceptionState& exceptionState)
+ static AnimationPlayer* animate(Element& element, const AnimationEffectOrDictionarySequence& effectInput, const AnimationTimingProperties& timingInput, ExceptionState& exceptionState)
{
- RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, keyframeDictionaryVector, exceptionState);
+ RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, effectInput, exceptionState);
if (exceptionState.hadException())
return 0;
- ASSERT(effect);
- return animateInternal(element, effect.release(), TimingInput::convert(duration));
+ return animateInternal(element, effect, TimingInput::convert(timingInput));
}
- static AnimationPlayer* animate(Element& element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState)
+ static AnimationPlayer* animate(Element& element, const AnimationEffectOrDictionarySequence& effectInput, ExceptionState& exceptionState)
{
- RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, keyframeDictionaryVector, exceptionState);
+ RefPtrWillBeRawPtr<AnimationEffect> effect = EffectInput::convert(&element, effectInput, exceptionState);
if (exceptionState.hadException())
return 0;
- ASSERT(effect);
- return animateInternal(element, effect.release(), Timing());
+ return animateInternal(element, effect, Timing());
}
static WillBeHeapVector<RefPtrWillBeMember<AnimationPlayer> > getAnimationPlayers(Element& element)

Powered by Google App Engine
This is Rietveld 408576698