| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 #include "core/animation/AnimationEffect.h" | 34 #include "core/animation/AnimationEffect.h" |
| 35 #include "core/animation/AnimationNode.h" | 35 #include "core/animation/AnimationNode.h" |
| 36 #include "core/animation/EffectInput.h" | 36 #include "core/animation/EffectInput.h" |
| 37 #include "core/animation/TimingInput.h" | 37 #include "core/animation/TimingInput.h" |
| 38 #include "platform/heap/Handle.h" | 38 #include "platform/heap/Handle.h" |
| 39 #include "wtf/RefPtr.h" | 39 #include "wtf/RefPtr.h" |
| 40 | 40 |
| 41 namespace blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class AnimationTimingProperties; |
| 43 class Dictionary; | 44 class Dictionary; |
| 44 class Element; | 45 class Element; |
| 45 class ExceptionState; | 46 class ExceptionState; |
| 46 class SampledEffect; | 47 class SampledEffect; |
| 47 | 48 |
| 48 class Animation final : public AnimationNode { | 49 class Animation final : public AnimationNode { |
| 49 DEFINE_WRAPPERTYPEINFO(); | 50 DEFINE_WRAPPERTYPEINFO(); |
| 50 public: | 51 public: |
| 51 enum Priority { DefaultPriority, TransitionPriority }; | 52 enum Priority { DefaultPriority, TransitionPriority }; |
| 52 | 53 |
| 53 static PassRefPtrWillBeRawPtr<Animation> create(Element*, PassRefPtrWillBeRa
wPtr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtrWill
BeRawPtr<EventDelegate> = nullptr); | 54 static PassRefPtrWillBeRawPtr<Animation> create(Element*, PassRefPtrWillBeRa
wPtr<AnimationEffect>, const Timing&, Priority = DefaultPriority, PassOwnPtrWill
BeRawPtr<EventDelegate> = nullptr); |
| 54 // Web Animations API Bindings constructors. | 55 // Web Animations API Bindings constructors. |
| 55 static PassRefPtrWillBeRawPtr<Animation> create(Element*, PassRefPtrWillBeRa
wPtr<AnimationEffect>, const Dictionary& timingInputDictionary); | |
| 56 static PassRefPtrWillBeRawPtr<Animation> create(Element*, PassRefPtrWillBeRa
wPtr<AnimationEffect>, double duration); | |
| 57 static PassRefPtrWillBeRawPtr<Animation> create(Element*, PassRefPtrWillBeRa
wPtr<AnimationEffect>); | |
| 58 static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dicti
onary>& keyframeDictionaryVector, const Dictionary& timingInputDictionary, Excep
tionState&); | |
| 59 static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dicti
onary>& keyframeDictionaryVector, double duration, ExceptionState&); | 56 static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dicti
onary>& keyframeDictionaryVector, double duration, ExceptionState&); |
| 57 static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dicti
onary>& keyframeDictionaryVector, const AnimationTimingProperties& timingInput,
ExceptionState&); |
| 60 static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dicti
onary>& keyframeDictionaryVector, ExceptionState&); | 58 static PassRefPtrWillBeRawPtr<Animation> create(Element*, const Vector<Dicti
onary>& keyframeDictionaryVector, ExceptionState&); |
| 61 | 59 |
| 62 virtual ~Animation(); | 60 virtual ~Animation(); |
| 63 | 61 |
| 64 virtual bool isAnimation() const override { return true; } | 62 virtual bool isAnimation() const override { return true; } |
| 65 | 63 |
| 66 bool affects(CSSPropertyID) const; | 64 bool affects(CSSPropertyID) const; |
| 67 const AnimationEffect* effect() const { return m_effect.get(); } | 65 const AnimationEffect* effect() const { return m_effect.get(); } |
| 68 AnimationEffect* effect() { return m_effect.get(); } | 66 AnimationEffect* effect() { return m_effect.get(); } |
| 69 void setEffect(PassRefPtrWillBeRawPtr<AnimationEffect> effect) { m_effect =
effect; } | 67 void setEffect(PassRefPtrWillBeRawPtr<AnimationEffect> effect) { m_effect =
effect; } |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 Vector<int> m_compositorAnimationIds; | 110 Vector<int> m_compositorAnimationIds; |
| 113 | 111 |
| 114 friend class AnimationAnimationV8Test; | 112 friend class AnimationAnimationV8Test; |
| 115 }; | 113 }; |
| 116 | 114 |
| 117 DEFINE_TYPE_CASTS(Animation, AnimationNode, animationNode, animationNode->isAnim
ation(), animationNode.isAnimation()); | 115 DEFINE_TYPE_CASTS(Animation, AnimationNode, animationNode, animationNode->isAnim
ation(), animationNode.isAnimation()); |
| 118 | 116 |
| 119 } // namespace blink | 117 } // namespace blink |
| 120 | 118 |
| 121 #endif // Animation_h | 119 #endif // Animation_h |
| OLD | NEW |