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

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

Issue 2651553004: Add TransitionKeyframe class for CSS Transition refactor (Closed)
Patch Set: Header Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Keyframe_h 5 #ifndef Keyframe_h
6 #define Keyframe_h 6 #define Keyframe_h
7 7
8 #include "core/CoreExport.h" 8 #include "core/CoreExport.h"
9 #include "core/animation/AnimationEffectReadOnly.h" 9 #include "core/animation/AnimationEffectReadOnly.h"
10 #include "core/animation/EffectModel.h" 10 #include "core/animation/EffectModel.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 virtual PassRefPtr<Keyframe> clone() const = 0; 53 virtual PassRefPtr<Keyframe> clone() const = 0;
54 PassRefPtr<Keyframe> cloneWithOffset(double offset) const { 54 PassRefPtr<Keyframe> cloneWithOffset(double offset) const {
55 RefPtr<Keyframe> theClone = clone(); 55 RefPtr<Keyframe> theClone = clone();
56 theClone->setOffset(offset); 56 theClone->setOffset(offset);
57 return theClone.release(); 57 return theClone.release();
58 } 58 }
59 59
60 virtual bool isAnimatableValueKeyframe() const { return false; } 60 virtual bool isAnimatableValueKeyframe() const { return false; }
61 virtual bool isStringKeyframe() const { return false; } 61 virtual bool isStringKeyframe() const { return false; }
62 virtual bool isTransitionKeyframe() const { return false; }
62 63
63 // Represents a property-value pair in a keyframe. 64 // Represents a property-value pair in a keyframe.
64 class PropertySpecificKeyframe : public RefCounted<PropertySpecificKeyframe> { 65 class PropertySpecificKeyframe : public RefCounted<PropertySpecificKeyframe> {
65 USING_FAST_MALLOC(PropertySpecificKeyframe); 66 USING_FAST_MALLOC(PropertySpecificKeyframe);
66 WTF_MAKE_NONCOPYABLE(PropertySpecificKeyframe); 67 WTF_MAKE_NONCOPYABLE(PropertySpecificKeyframe);
67 68
68 public: 69 public:
69 virtual ~PropertySpecificKeyframe() {} 70 virtual ~PropertySpecificKeyframe() {}
70 double offset() const { return m_offset; } 71 double offset() const { return m_offset; }
71 TimingFunction& easing() const { return *m_easing; } 72 TimingFunction& easing() const { return *m_easing; }
(...skipping 14 matching lines...) Expand all
86 const ComputedStyle* parentStyle) const { 87 const ComputedStyle* parentStyle) const {
87 return false; 88 return false;
88 } 89 }
89 virtual PassRefPtr<AnimatableValue> getAnimatableValue() const = 0; 90 virtual PassRefPtr<AnimatableValue> getAnimatableValue() const = 0;
90 91
91 virtual bool isAnimatableValuePropertySpecificKeyframe() const { 92 virtual bool isAnimatableValuePropertySpecificKeyframe() const {
92 return false; 93 return false;
93 } 94 }
94 virtual bool isCSSPropertySpecificKeyframe() const { return false; } 95 virtual bool isCSSPropertySpecificKeyframe() const { return false; }
95 virtual bool isSVGPropertySpecificKeyframe() const { return false; } 96 virtual bool isSVGPropertySpecificKeyframe() const { return false; }
97 virtual bool isTransitionPropertySpecificKeyframe() const { return false; }
96 98
97 virtual PassRefPtr<PropertySpecificKeyframe> neutralKeyframe( 99 virtual PassRefPtr<PropertySpecificKeyframe> neutralKeyframe(
98 double offset, 100 double offset,
99 PassRefPtr<TimingFunction> easing) const = 0; 101 PassRefPtr<TimingFunction> easing) const = 0;
100 virtual PassRefPtr<Interpolation> createInterpolation( 102 virtual PassRefPtr<Interpolation> createInterpolation(
101 const PropertyHandle&, 103 const PropertyHandle&,
102 const Keyframe::PropertySpecificKeyframe& end) const; 104 const Keyframe::PropertySpecificKeyframe& end) const;
103 105
104 protected: 106 protected:
105 PropertySpecificKeyframe(double offset, 107 PropertySpecificKeyframe(double offset,
(...skipping 21 matching lines...) Expand all
127 double m_offset; 129 double m_offset;
128 EffectModel::CompositeOperation m_composite; 130 EffectModel::CompositeOperation m_composite;
129 RefPtr<TimingFunction> m_easing; 131 RefPtr<TimingFunction> m_easing;
130 }; 132 };
131 133
132 using PropertySpecificKeyframe = Keyframe::PropertySpecificKeyframe; 134 using PropertySpecificKeyframe = Keyframe::PropertySpecificKeyframe;
133 135
134 } // namespace blink 136 } // namespace blink
135 137
136 #endif // Keyframe_h 138 #endif // Keyframe_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/animation/BUILD.gn ('k') | third_party/WebKit/Source/core/animation/TransitionKeyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698