| 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 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef KeyframeEffect_h | 31 #ifndef KeyframeEffect_h |
| 32 #define KeyframeEffect_h | 32 #define KeyframeEffect_h |
| 33 | 33 |
| 34 #include "core/CoreExport.h" | 34 #include "core/CoreExport.h" |
| 35 #include "core/animation/AnimationEffectTiming.h" |
| 35 #include "core/animation/EffectInput.h" | 36 #include "core/animation/EffectInput.h" |
| 36 #include "core/animation/EffectModel.h" | 37 #include "core/animation/EffectModel.h" |
| 37 #include "core/animation/KeyframeEffectReadOnly.h" | 38 #include "core/animation/KeyframeEffectReadOnly.h" |
| 38 #include "core/animation/TimingInput.h" | 39 #include "core/animation/TimingInput.h" |
| 39 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
| 40 #include "wtf/RefPtr.h" | 41 #include "wtf/RefPtr.h" |
| 41 | 42 |
| 42 namespace blink { | 43 namespace blink { |
| 43 | 44 |
| 44 class KeyframeEffectOptions; | |
| 45 class Dictionary; | 45 class Dictionary; |
| 46 class Element; | 46 class Element; |
| 47 class ExceptionState; | 47 class ExceptionState; |
| 48 class KeyframeEffectOptions; |
| 48 class PropertyHandle; | 49 class PropertyHandle; |
| 49 class SampledEffect; | 50 class SampledEffect; |
| 50 | 51 |
| 51 // Represents the effect of an Animation on an Element's properties. | 52 // Represents the effect of an Animation on an Element's properties. |
| 52 // http://w3c.github.io/web-animations/#keyframe-effect | 53 // http://w3c.github.io/web-animations/#keyframe-effect |
| 53 class CORE_EXPORT KeyframeEffect final : public KeyframeEffectReadOnly { | 54 class CORE_EXPORT KeyframeEffect final : public KeyframeEffectReadOnly { |
| 54 DEFINE_WRAPPERTYPEINFO(); | 55 DEFINE_WRAPPERTYPEINFO(); |
| 55 | 56 |
| 56 public: | 57 public: |
| 57 enum Priority { DefaultPriority, TransitionPriority }; | 58 enum Priority { DefaultPriority, TransitionPriority }; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 void cancelIncompatibleAnimationsOnCompositor(); | 107 void cancelIncompatibleAnimationsOnCompositor(); |
| 107 void pauseAnimationForTestingOnCompositor(double pauseTime); | 108 void pauseAnimationForTestingOnCompositor(double pauseTime); |
| 108 | 109 |
| 109 void attachCompositedLayers(); | 110 void attachCompositedLayers(); |
| 110 | 111 |
| 111 void setCompositorAnimationIdsForTesting( | 112 void setCompositorAnimationIdsForTesting( |
| 112 const Vector<int>& compositorAnimationIds) { | 113 const Vector<int>& compositorAnimationIds) { |
| 113 m_compositorAnimationIds = compositorAnimationIds; | 114 m_compositorAnimationIds = compositorAnimationIds; |
| 114 } | 115 } |
| 115 | 116 |
| 117 AnimationEffectTiming* timing() override; |
| 118 |
| 116 DECLARE_VIRTUAL_TRACE(); | 119 DECLARE_VIRTUAL_TRACE(); |
| 117 | 120 |
| 118 void downgradeToNormal() { m_priority = DefaultPriority; } | 121 void downgradeToNormal() { m_priority = DefaultPriority; } |
| 119 | 122 |
| 120 protected: | 123 protected: |
| 121 void applyEffects(); | 124 void applyEffects(); |
| 122 void clearEffects(); | 125 void clearEffects(); |
| 123 void updateChildrenAndEffects() const override; | 126 void updateChildrenAndEffects() const override; |
| 124 void attach(Animation*) override; | 127 void attach(Animation*) override; |
| 125 void detach() override; | 128 void detach() override; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 145 | 148 |
| 146 DEFINE_TYPE_CASTS(KeyframeEffect, | 149 DEFINE_TYPE_CASTS(KeyframeEffect, |
| 147 AnimationEffectReadOnly, | 150 AnimationEffectReadOnly, |
| 148 animationNode, | 151 animationNode, |
| 149 animationNode->isKeyframeEffect(), | 152 animationNode->isKeyframeEffect(), |
| 150 animationNode.isKeyframeEffect()); | 153 animationNode.isKeyframeEffect()); |
| 151 | 154 |
| 152 } // namespace blink | 155 } // namespace blink |
| 153 | 156 |
| 154 #endif // KeyframeEffect_h | 157 #endif // KeyframeEffect_h |
| OLD | NEW |