| Index: Source/core/animation/Animation.h
|
| diff --git a/Source/core/animation/Animation.h b/Source/core/animation/Animation.h
|
| index f360e3c9a57909c5249bf91080146c5a504681ce..acd0c7889bdcc56e7e5a1c704ca764bb1d104ff2 100644
|
| --- a/Source/core/animation/Animation.h
|
| +++ b/Source/core/animation/Animation.h
|
| @@ -48,9 +48,12 @@ public:
|
|
|
| static PassRefPtr<Animation> create(PassRefPtr<Element>, PassRefPtrWillBeRawPtr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtr<EventDelegate> = nullptr);
|
| // Web Animations API Bindings constructors.
|
| - static PassRefPtr<Animation> create(Element*, Vector<Dictionary> keyframeDictionaryVector, Dictionary timingInput);
|
| - static PassRefPtr<Animation> create(Element*, Vector<Dictionary> keyframeDictionaryVector, double timingInput);
|
| - static PassRefPtr<Animation> create(Element*, Vector<Dictionary> keyframeDictionaryVector);
|
| + template<typename E, typename T = double>
|
| + static PassRefPtr<Animation> create(Element* element, E effectInput, T timingInput = Timing::initialIterationDuration())
|
| + {
|
| + ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
|
| + return adoptRef(new Animation(element, convertEffectInput(element, effectInput), Timing::convertInput(timingInput), DefaultPriority, nullptr));
|
| + }
|
|
|
| // FIXME: Move all of these setter methods out of Animation,
|
| // possibly into a new class (TimingInput?).
|
| @@ -94,11 +97,9 @@ protected:
|
| virtual double calculateTimeToEffectChange(bool forwards, double inheritedTime, double timeToNextIteration) const OVERRIDE;
|
|
|
| private:
|
| + static PassRefPtrWillBeRawPtr<AnimationEffect> convertEffectInput(Element*, Vector<Dictionary> keyframeDictionaryVector, bool unsafe = false);
|
| + static PassRefPtrWillBeRawPtr<AnimationEffect> convertEffectInput(Element*, PassRefPtrWillBeRawPtr<AnimationEffect> effect) { return effect; }
|
| static void populateTiming(Timing&, Dictionary);
|
| - // createUnsafe should only be directly called from tests.
|
| - static PassRefPtr<Animation> createUnsafe(Element*, Vector<Dictionary> keyframeDictionaryVector, Dictionary timingInput);
|
| - static PassRefPtr<Animation> createUnsafe(Element*, Vector<Dictionary> keyframeDictionaryVector, double timingInput);
|
| - static PassRefPtr<Animation> createUnsafe(Element*, Vector<Dictionary> keyframeDictionaryVector);
|
|
|
| Animation(PassRefPtr<Element>, PassRefPtrWillBeRawPtr<AnimationEffect>, const Timing&, Priority, PassOwnPtr<EventDelegate>);
|
|
|
|
|