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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 102 } |
103 | 103 |
104 // AnimationEffect implementation. | 104 // AnimationEffect implementation. |
105 virtual PassOwnPtr<Vector<RefPtr<Interpolation> > > sample(int iteration, do
uble fraction) const OVERRIDE; | 105 virtual PassOwnPtr<Vector<RefPtr<Interpolation> > > sample(int iteration, do
uble fraction) const OVERRIDE; |
106 | 106 |
107 // FIXME: Implement setFrames() | 107 // FIXME: Implement setFrames() |
108 const KeyframeVector& getFrames() const { return m_keyframes; } | 108 const KeyframeVector& getFrames() const { return m_keyframes; } |
109 | 109 |
110 virtual bool isKeyframeEffectModel() const OVERRIDE { return true; } | 110 virtual bool isKeyframeEffectModel() const OVERRIDE { return true; } |
111 | 111 |
| 112 bool isReplaceOnly(); |
| 113 |
112 PropertySet properties() const; | 114 PropertySet properties() const; |
113 | 115 |
114 class PropertySpecificKeyframe { | 116 class PropertySpecificKeyframe { |
115 public: | 117 public: |
116 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, const AnimatableValue*, CompositeOperation); | 118 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, const AnimatableValue*, CompositeOperation); |
117 double offset() const { return m_offset; } | 119 double offset() const { return m_offset; } |
118 TimingFunction* easing() const { return m_easing.get(); } | 120 TimingFunction* easing() const { return m_easing.get(); } |
119 const AnimatableValue* value() const { return m_value.get(); } | 121 const AnimatableValue* value() const { return m_value.get(); } |
| 122 AnimationEffect::CompositeOperation composite() const { return m_composi
te; } |
120 PassOwnPtr<PropertySpecificKeyframe> cloneWithOffset(double offset) cons
t; | 123 PassOwnPtr<PropertySpecificKeyframe> cloneWithOffset(double offset) cons
t; |
121 private: | 124 private: |
122 // Used by cloneWithOffset(). | 125 // Used by cloneWithOffset(). |
123 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, PassRefPtr<AnimatableValue>); | 126 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin
g, PassRefPtr<AnimatableValue>, CompositeOperation); |
124 double m_offset; | 127 double m_offset; |
125 RefPtr<TimingFunction> m_easing; | 128 RefPtr<TimingFunction> m_easing; |
126 RefPtr<AnimatableValue> m_value; | 129 RefPtr<AnimatableValue> m_value; |
| 130 AnimationEffect::CompositeOperation m_composite; |
127 }; | 131 }; |
128 | 132 |
129 class PropertySpecificKeyframeGroup { | 133 class PropertySpecificKeyframeGroup { |
130 public: | 134 public: |
131 void appendKeyframe(PassOwnPtr<PropertySpecificKeyframe>); | 135 void appendKeyframe(PassOwnPtr<PropertySpecificKeyframe>); |
132 const PropertySpecificKeyframeVector& keyframes() const { return m_keyfr
ames; } | 136 const PropertySpecificKeyframeVector& keyframes() const { return m_keyfr
ames; } |
133 private: | 137 private: |
134 PropertySpecificKeyframeVector m_keyframes; | 138 PropertySpecificKeyframeVector m_keyframes; |
135 void removeRedundantKeyframes(); | 139 void removeRedundantKeyframes(); |
136 void addSyntheticKeyframeIfRequired(); | 140 void addSyntheticKeyframeIfRequired(); |
(...skipping 28 matching lines...) Expand all Loading... |
165 mutable RefPtr<InterpolationEffect> m_interpolationEffect; | 169 mutable RefPtr<InterpolationEffect> m_interpolationEffect; |
166 | 170 |
167 friend class KeyframeEffectModelTest; | 171 friend class KeyframeEffectModelTest; |
168 }; | 172 }; |
169 | 173 |
170 DEFINE_TYPE_CASTS(KeyframeEffectModel, AnimationEffect, value, value->isKeyframe
EffectModel(), value.isKeyframeEffectModel()); | 174 DEFINE_TYPE_CASTS(KeyframeEffectModel, AnimationEffect, value, value->isKeyframe
EffectModel(), value.isKeyframeEffectModel()); |
171 | 175 |
172 } // namespace WebCore | 176 } // namespace WebCore |
173 | 177 |
174 #endif // KeyframeEffectModel_h | 178 #endif // KeyframeEffectModel_h |
OLD | NEW |