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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 const KeyframeVector& getFrames() const { return m_keyframes; } | 79 const KeyframeVector& getFrames() const { return m_keyframes; } |
80 // FIXME: Implement setFrames() | 80 // FIXME: Implement setFrames() |
81 | 81 |
82 const PropertySpecificKeyframeVector& getPropertySpecificKeyframes(CSSProper
tyID id) const | 82 const PropertySpecificKeyframeVector& getPropertySpecificKeyframes(CSSProper
tyID id) const |
83 { | 83 { |
84 ensureKeyframeGroups(); | 84 ensureKeyframeGroups(); |
85 return m_keyframeGroups->get(id)->keyframes(); | 85 return m_keyframeGroups->get(id)->keyframes(); |
86 } | 86 } |
87 | 87 |
88 // AnimationEffect implementation. | 88 // AnimationEffect implementation. |
89 virtual PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpola
tion> > > sample(int iteration, double fraction, double iterationDuration) const
OVERRIDE; | 89 virtual PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpola
tion> > > sample(int iteration, double fraction, double iterationDuration) const
override; |
90 | 90 |
91 virtual bool isKeyframeEffectModel() const OVERRIDE { return true; } | 91 virtual bool isKeyframeEffectModel() const override { return true; } |
92 | 92 |
93 virtual bool isAnimatableValueKeyframeEffectModel() const { return false; } | 93 virtual bool isAnimatableValueKeyframeEffectModel() const { return false; } |
94 virtual bool isStringKeyframeEffectModel() const { return false; } | 94 virtual bool isStringKeyframeEffectModel() const { return false; } |
95 | 95 |
96 virtual void trace(Visitor*) OVERRIDE; | 96 virtual void trace(Visitor*) override; |
97 | 97 |
98 // FIXME: This is a hack used to resolve CSSValues to AnimatableValues while
we have a valid handle on an element. | 98 // FIXME: This is a hack used to resolve CSSValues to AnimatableValues while
we have a valid handle on an element. |
99 // This should be removed once StringKeyframes no longer uses InterpolableAn
imatableValues. | 99 // This should be removed once StringKeyframes no longer uses InterpolableAn
imatableValues. |
100 void forceConversionsToAnimatableValues(Element* element) | 100 void forceConversionsToAnimatableValues(Element* element) |
101 { | 101 { |
102 ensureKeyframeGroups(); | 102 ensureKeyframeGroups(); |
103 ensureInterpolationEffect(element); | 103 ensureInterpolationEffect(element); |
104 } | 104 } |
105 | 105 |
106 protected: | 106 protected: |
(...skipping 14 matching lines...) Expand all Loading... |
121 friend class KeyframeEffectModelTest; | 121 friend class KeyframeEffectModelTest; |
122 | 122 |
123 bool affects(CSSPropertyID property) | 123 bool affects(CSSPropertyID property) |
124 { | 124 { |
125 ensureKeyframeGroups(); | 125 ensureKeyframeGroups(); |
126 return m_keyframeGroups->contains(property); | 126 return m_keyframeGroups->contains(property); |
127 } | 127 } |
128 }; | 128 }; |
129 | 129 |
130 template <class Keyframe> | 130 template <class Keyframe> |
131 class KeyframeEffectModel FINAL : public KeyframeEffectModelBase { | 131 class KeyframeEffectModel final : public KeyframeEffectModelBase { |
132 public: | 132 public: |
133 typedef WillBeHeapVector<RefPtrWillBeMember<Keyframe> > KeyframeVector; | 133 typedef WillBeHeapVector<RefPtrWillBeMember<Keyframe> > KeyframeVector; |
134 static PassRefPtrWillBeRawPtr<KeyframeEffectModel<Keyframe> > create(const K
eyframeVector& keyframes) { return adoptRefWillBeNoop(new KeyframeEffectModel(ke
yframes)); } | 134 static PassRefPtrWillBeRawPtr<KeyframeEffectModel<Keyframe> > create(const K
eyframeVector& keyframes) { return adoptRefWillBeNoop(new KeyframeEffectModel(ke
yframes)); } |
135 | 135 |
136 private: | 136 private: |
137 KeyframeEffectModel(const KeyframeVector& keyframes) | 137 KeyframeEffectModel(const KeyframeVector& keyframes) |
138 { | 138 { |
139 m_keyframes.appendVector(keyframes); | 139 m_keyframes.appendVector(keyframes); |
140 } | 140 } |
141 | 141 |
(...skipping 28 matching lines...) Expand all Loading... |
170 | 170 |
171 template <> | 171 template <> |
172 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr
ameEffectModel() const { return true; } | 172 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr
ameEffectModel() const { return true; } |
173 | 173 |
174 template <> | 174 template <> |
175 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c
onst { return true; } | 175 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c
onst { return true; } |
176 | 176 |
177 } // namespace blink | 177 } // namespace blink |
178 | 178 |
179 #endif // KeyframeEffectModel_h | 179 #endif // KeyframeEffectModel_h |
OLD | NEW |