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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
73 PassRefPtrWillBeRawPtr<Keyframe> clone() const { return adoptRefWillBeNoop(n ew Keyframe(*this)); } | 73 PassRefPtrWillBeRawPtr<Keyframe> clone() const { return adoptRefWillBeNoop(n ew Keyframe(*this)); } |
74 PassRefPtrWillBeRawPtr<Keyframe> cloneWithOffset(double offset) const; | 74 PassRefPtrWillBeRawPtr<Keyframe> cloneWithOffset(double offset) const; |
75 | 75 |
76 void trace(Visitor*) { } | 76 void trace(Visitor*) { } |
77 private: | 77 private: |
78 Keyframe(); | 78 Keyframe(); |
79 Keyframe(const Keyframe&); | 79 Keyframe(const Keyframe&); |
80 double m_offset; | 80 double m_offset; |
81 AnimationEffect::CompositeOperation m_composite; | 81 AnimationEffect::CompositeOperation m_composite; |
82 RefPtr<TimingFunction> m_easing; | 82 RefPtr<TimingFunction> m_easing; |
83 typedef HashMap<CSSPropertyID, RefPtr<AnimatableValue> > PropertyValueMap; | 83 typedef WillBeHeapHashMap<CSSPropertyID, RefPtrWillBeMember<AnimatableValue> > PropertyValueMap; |
84 PropertyValueMap m_propertyValues; | 84 PropertyValueMap m_propertyValues; |
sof
2014/03/20 07:20:39
Doesn't look as if this is trace()d.
| |
85 }; | 85 }; |
86 | 86 |
87 class KeyframeEffectModel FINAL : public AnimationEffect { | 87 class KeyframeEffectModel FINAL : public AnimationEffect { |
88 public: | 88 public: |
89 class PropertySpecificKeyframe; | 89 class PropertySpecificKeyframe; |
90 typedef WillBeHeapVector<RefPtrWillBeMember<Keyframe> > KeyframeVector; | 90 typedef WillBeHeapVector<RefPtrWillBeMember<Keyframe> > KeyframeVector; |
91 typedef Vector<OwnPtr<PropertySpecificKeyframe> > PropertySpecificKeyframeVe ctor; | 91 typedef Vector<OwnPtr<PropertySpecificKeyframe> > PropertySpecificKeyframeVe ctor; |
92 // FIXME: Implement accumulation. | 92 // FIXME: Implement accumulation. |
93 static PassRefPtrWillBeRawPtr<KeyframeEffectModel> create(const KeyframeVect or& keyframes) | 93 static PassRefPtrWillBeRawPtr<KeyframeEffectModel> create(const KeyframeVect or& keyframes) |
94 { | 94 { |
(...skipping 18 matching lines...) Expand all Loading... | |
113 | 113 |
114 class PropertySpecificKeyframe { | 114 class PropertySpecificKeyframe { |
115 public: | 115 public: |
116 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, const AnimatableValue*, CompositeOperation); | 116 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, const AnimatableValue*, CompositeOperation); |
117 double offset() const { return m_offset; } | 117 double offset() const { return m_offset; } |
118 TimingFunction* easing() const { return m_easing.get(); } | 118 TimingFunction* easing() const { return m_easing.get(); } |
119 const AnimatableValue* value() const { return m_value.get(); } | 119 const AnimatableValue* value() const { return m_value.get(); } |
120 PassOwnPtr<PropertySpecificKeyframe> cloneWithOffset(double offset) cons t; | 120 PassOwnPtr<PropertySpecificKeyframe> cloneWithOffset(double offset) cons t; |
121 private: | 121 private: |
122 // Used by cloneWithOffset(). | 122 // Used by cloneWithOffset(). |
123 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, PassRefPtr<AnimatableValue>); | 123 PropertySpecificKeyframe(double offset, PassRefPtr<TimingFunction> easin g, PassRefPtrWillBeRawPtr<AnimatableValue>); |
124 double m_offset; | 124 double m_offset; |
125 RefPtr<TimingFunction> m_easing; | 125 RefPtr<TimingFunction> m_easing; |
126 RefPtr<AnimatableValue> m_value; | 126 RefPtrWillBePersistent<AnimatableValue> m_value; |
127 }; | 127 }; |
128 | 128 |
129 class PropertySpecificKeyframeGroup { | 129 class PropertySpecificKeyframeGroup { |
130 public: | 130 public: |
131 void appendKeyframe(PassOwnPtr<PropertySpecificKeyframe>); | 131 void appendKeyframe(PassOwnPtr<PropertySpecificKeyframe>); |
132 const PropertySpecificKeyframeVector& keyframes() const { return m_keyfr ames; } | 132 const PropertySpecificKeyframeVector& keyframes() const { return m_keyfr ames; } |
133 private: | 133 private: |
134 PropertySpecificKeyframeVector m_keyframes; | 134 PropertySpecificKeyframeVector m_keyframes; |
135 void removeRedundantKeyframes(); | 135 void removeRedundantKeyframes(); |
136 void addSyntheticKeyframeIfRequired(); | 136 void addSyntheticKeyframeIfRequired(); |
(...skipping 28 matching lines...) Expand all Loading... | |
165 mutable RefPtr<InterpolationEffect> m_interpolationEffect; | 165 mutable RefPtr<InterpolationEffect> m_interpolationEffect; |
166 | 166 |
167 friend class KeyframeEffectModelTest; | 167 friend class KeyframeEffectModelTest; |
168 }; | 168 }; |
169 | 169 |
170 DEFINE_TYPE_CASTS(KeyframeEffectModel, AnimationEffect, value, value->isKeyframe EffectModel(), value.isKeyframeEffectModel()); | 170 DEFINE_TYPE_CASTS(KeyframeEffectModel, AnimationEffect, value, value->isKeyframe EffectModel(), value.isKeyframeEffectModel()); |
171 | 171 |
172 } // namespace WebCore | 172 } // namespace WebCore |
173 | 173 |
174 #endif // KeyframeEffectModel_h | 174 #endif // KeyframeEffectModel_h |
OLD | NEW |