OLD | NEW |
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 "CSSPropertyNames.h" | 8 #include "CSSPropertyNames.h" |
9 #include "core/animation/AnimatableValue.h" | 9 #include "core/animation/AnimatableValue.h" |
10 #include "core/animation/AnimationEffect.h" | 10 #include "core/animation/AnimationEffect.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 void setOffset(double offset) { m_offset = offset; } | 24 void setOffset(double offset) { m_offset = offset; } |
25 double offset() const { return m_offset; } | 25 double offset() const { return m_offset; } |
26 | 26 |
27 void setComposite(AnimationEffect::CompositeOperation composite) { m_composi
te = composite; } | 27 void setComposite(AnimationEffect::CompositeOperation composite) { m_composi
te = composite; } |
28 AnimationEffect::CompositeOperation composite() const { return m_composite;
} | 28 AnimationEffect::CompositeOperation composite() const { return m_composite;
} |
29 | 29 |
30 void setEasing(PassRefPtr<TimingFunction> easing) { m_easing = easing; } | 30 void setEasing(PassRefPtr<TimingFunction> easing) { m_easing = easing; } |
31 TimingFunction* easing() const { return m_easing.get(); } | 31 TimingFunction* easing() const { return m_easing.get(); } |
32 | 32 |
33 static bool compareOffsets(const RefPtrWillBeMember<Keyframe>&, const RefPtr
WillBeMember<Keyframe>&); | 33 static bool compareOffsets(const RefPtrWillBeMember<Keyframe>& a, const RefP
trWillBeMember<Keyframe>& b) |
| 34 { |
| 35 return a->offset() < b->offset(); |
| 36 } |
| 37 |
34 virtual PropertySet properties() const = 0; | 38 virtual PropertySet properties() const = 0; |
35 | 39 |
36 virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const = 0; | 40 virtual PassRefPtrWillBeRawPtr<Keyframe> clone() const = 0; |
37 PassRefPtrWillBeRawPtr<Keyframe> cloneWithOffset(double offset) const | 41 PassRefPtrWillBeRawPtr<Keyframe> cloneWithOffset(double offset) const |
38 { | 42 { |
39 RefPtrWillBeRawPtr<Keyframe> theClone = clone(); | 43 RefPtrWillBeRawPtr<Keyframe> theClone = clone(); |
40 theClone->setOffset(offset); | 44 theClone->setOffset(offset); |
41 return theClone.release(); | 45 return theClone.release(); |
42 } | 46 } |
43 | 47 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 93 } |
90 | 94 |
91 double m_offset; | 95 double m_offset; |
92 AnimationEffect::CompositeOperation m_composite; | 96 AnimationEffect::CompositeOperation m_composite; |
93 RefPtr<TimingFunction> m_easing; | 97 RefPtr<TimingFunction> m_easing; |
94 }; | 98 }; |
95 | 99 |
96 } | 100 } |
97 | 101 |
98 #endif | 102 #endif |
OLD | NEW |