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

Side by Side Diff: third_party/WebKit/Source/core/animation/KeyframeEffect.h

Issue 2369833002: Introduce KeyframeEffectReadOnly interface (Closed)
Patch Set: Use short form of copyright message Created 4 years, 2 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 unified diff | Download patch
OLDNEW
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
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/AnimationEffectReadOnly.h"
36 #include "core/animation/EffectInput.h" 35 #include "core/animation/EffectInput.h"
37 #include "core/animation/EffectModel.h" 36 #include "core/animation/EffectModel.h"
37 #include "core/animation/KeyframeEffectReadOnly.h"
38 #include "core/animation/TimingInput.h" 38 #include "core/animation/TimingInput.h"
39 #include "platform/heap/Handle.h" 39 #include "platform/heap/Handle.h"
40 #include "wtf/RefPtr.h" 40 #include "wtf/RefPtr.h"
41 41
42 namespace blink { 42 namespace blink {
43 43
44 class KeyframeEffectOptions; 44 class KeyframeEffectOptions;
45 class Dictionary; 45 class Dictionary;
46 class Element; 46 class Element;
47 class ExceptionState; 47 class ExceptionState;
48 class PropertyHandle; 48 class PropertyHandle;
49 class SampledEffect; 49 class SampledEffect;
50 50
51 // Represents the effect of an Animation on an Element's properties. 51 // Represents the effect of an Animation on an Element's properties.
52 // http://w3c.github.io/web-animations/#keyframe-effect 52 // http://w3c.github.io/web-animations/#keyframe-effect
53 class CORE_EXPORT KeyframeEffect final : public AnimationEffectReadOnly { 53 class CORE_EXPORT KeyframeEffect final : public KeyframeEffectReadOnly {
54 DEFINE_WRAPPERTYPEINFO(); 54 DEFINE_WRAPPERTYPEINFO();
55 public: 55 public:
56 enum Priority { DefaultPriority, TransitionPriority }; 56 enum Priority { DefaultPriority, TransitionPriority };
57 57
58 static KeyframeEffect* create(Element*, EffectModel*, const Timing&, Priorit y = DefaultPriority, EventDelegate* = nullptr); 58 static KeyframeEffect* create(Element*, EffectModel*, const Timing&, Priorit y = DefaultPriority, EventDelegate* = nullptr);
59 // Web Animations API Bindings constructors. 59 // Web Animations API Bindings constructors.
60 static KeyframeEffect* create(ExecutionContext*, Element*, const DictionaryS equenceOrDictionary& effectInput, double duration, ExceptionState&); 60 static KeyframeEffect* create(ExecutionContext*, Element*, const DictionaryS equenceOrDictionary& effectInput, double duration, ExceptionState&);
61 static KeyframeEffect* create(ExecutionContext*, Element*, const DictionaryS equenceOrDictionary& effectInput, const KeyframeEffectOptions& timingInput, Exce ptionState&); 61 static KeyframeEffect* create(ExecutionContext*, Element*, const DictionaryS equenceOrDictionary& effectInput, const KeyframeEffectOptions& timingInput, Exce ptionState&);
62 static KeyframeEffect* create(ExecutionContext*, Element*, const DictionaryS equenceOrDictionary& effectInput, ExceptionState&); 62 static KeyframeEffect* create(ExecutionContext*, Element*, const DictionaryS equenceOrDictionary& effectInput, ExceptionState&);
63 63
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 void attach(Animation*) override; 99 void attach(Animation*) override;
100 void detach() override; 100 void detach() override;
101 void specifiedTimingChanged() override; 101 void specifiedTimingChanged() override;
102 double calculateTimeToEffectChange(bool forwards, double inheritedTime, doub le timeToNextIteration) const override; 102 double calculateTimeToEffectChange(bool forwards, double inheritedTime, doub le timeToNextIteration) const override;
103 virtual bool hasIncompatibleStyle(); 103 virtual bool hasIncompatibleStyle();
104 bool hasMultipleTransformProperties() const; 104 bool hasMultipleTransformProperties() const;
105 105
106 private: 106 private:
107 KeyframeEffect(Element*, EffectModel*, const Timing&, Priority, EventDelegat e*); 107 KeyframeEffect(Element*, EffectModel*, const Timing&, Priority, EventDelegat e*);
108 108
109 Member<Element> m_target;
110 Member<EffectModel> m_model;
111 Member<SampledEffect> m_sampledEffect;
112
113 Priority m_priority; 109 Priority m_priority;
114
115 Vector<int> m_compositorAnimationIds; 110 Vector<int> m_compositorAnimationIds;
116 111
117 friend class AnimationAnimationV8Test; 112 friend class AnimationAnimationV8Test;
118 }; 113 };
119 114
120 DEFINE_TYPE_CASTS(KeyframeEffect, AnimationEffectReadOnly, animationNode, animat ionNode->isKeyframeEffect(), animationNode.isKeyframeEffect()); 115 DEFINE_TYPE_CASTS(KeyframeEffect, AnimationEffectReadOnly, animationNode, animat ionNode->isKeyframeEffect(), animationNode.isKeyframeEffect());
121 116
122 } // namespace blink 117 } // namespace blink
123 118
124 #endif // KeyframeEffect_h 119 #endif // KeyframeEffect_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/BUILD.gn ('k') | third_party/WebKit/Source/core/animation/KeyframeEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698