| 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 virtual void trace(Visitor*) override; | 102 virtual void trace(Visitor*) override; |
| 103 | 103 |
| 104 // FIXME: This is a hack used to resolve CSSValues to AnimatableValues while
we have a valid handle on an element. | 104 // FIXME: This is a hack used to resolve CSSValues to AnimatableValues while
we have a valid handle on an element. |
| 105 // This should be removed once StringKeyframes no longer uses InterpolableAn
imatableValues. | 105 // This should be removed once StringKeyframes no longer uses InterpolableAn
imatableValues. |
| 106 void forceConversionsToAnimatableValues(Element* element) | 106 void forceConversionsToAnimatableValues(Element* element) |
| 107 { | 107 { |
| 108 ensureKeyframeGroups(); | 108 ensureKeyframeGroups(); |
| 109 ensureInterpolationEffect(element); | 109 ensureInterpolationEffect(element); |
| 110 } | 110 } |
| 111 | 111 |
| 112 void setDeferredInterpolationsOutdated(bool outdated) |
| 113 { |
| 114 m_interpolationEffect->setDeferredInterpolationsOutdated(outdated); |
| 115 } |
| 116 |
| 112 static KeyframeVector normalizedKeyframesForInspector(const KeyframeVector&
keyframes) { return normalizedKeyframes(keyframes); } | 117 static KeyframeVector normalizedKeyframesForInspector(const KeyframeVector&
keyframes) { return normalizedKeyframes(keyframes); } |
| 113 | 118 |
| 114 protected: | 119 protected: |
| 115 static KeyframeVector normalizedKeyframes(const KeyframeVector& keyframes); | 120 static KeyframeVector normalizedKeyframes(const KeyframeVector& keyframes); |
| 116 | 121 |
| 117 // Lazily computes the groups of property-specific keyframes. | 122 // Lazily computes the groups of property-specific keyframes. |
| 118 void ensureKeyframeGroups() const; | 123 void ensureKeyframeGroups() const; |
| 119 void ensureInterpolationEffect(Element* = nullptr) const; | 124 void ensureInterpolationEffect(Element* = nullptr) const; |
| 120 | 125 |
| 121 KeyframeVector m_keyframes; | 126 KeyframeVector m_keyframes; |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 inline const AnimatableValueKeyframeEffectModel* toAnimatableValueKeyframeEffect
Model(const AnimationEffect* base) | 176 inline const AnimatableValueKeyframeEffectModel* toAnimatableValueKeyframeEffect
Model(const AnimationEffect* base) |
| 172 { | 177 { |
| 173 return toAnimatableValueKeyframeEffectModel(toKeyframeEffectModelBase(base))
; | 178 return toAnimatableValueKeyframeEffectModel(toKeyframeEffectModelBase(base))
; |
| 174 } | 179 } |
| 175 | 180 |
| 176 inline AnimatableValueKeyframeEffectModel* toAnimatableValueKeyframeEffectModel(
AnimationEffect* base) | 181 inline AnimatableValueKeyframeEffectModel* toAnimatableValueKeyframeEffectModel(
AnimationEffect* base) |
| 177 { | 182 { |
| 178 return toAnimatableValueKeyframeEffectModel(toKeyframeEffectModelBase(base))
; | 183 return toAnimatableValueKeyframeEffectModel(toKeyframeEffectModelBase(base))
; |
| 179 } | 184 } |
| 180 | 185 |
| 186 inline const StringKeyframeEffectModel* toStringKeyframeEffectModel(const Animat
ionEffect* base) |
| 187 { |
| 188 return toStringKeyframeEffectModel(toKeyframeEffectModelBase(base)); |
| 189 } |
| 190 |
| 191 inline StringKeyframeEffectModel* toStringKeyframeEffectModel(AnimationEffect* b
ase) |
| 192 { |
| 193 return toStringKeyframeEffectModel(toKeyframeEffectModelBase(base)); |
| 194 } |
| 195 |
| 181 template <> | 196 template <> |
| 182 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr
ameEffectModel() const { return true; } | 197 inline bool KeyframeEffectModel<AnimatableValueKeyframe>::isAnimatableValueKeyfr
ameEffectModel() const { return true; } |
| 183 | 198 |
| 184 template <> | 199 template <> |
| 185 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c
onst { return true; } | 200 inline bool KeyframeEffectModel<StringKeyframe>::isStringKeyframeEffectModel() c
onst { return true; } |
| 186 | 201 |
| 187 } // namespace blink | 202 } // namespace blink |
| 188 | 203 |
| 189 #endif // KeyframeEffectModel_h | 204 #endif // KeyframeEffectModel_h |
| OLD | NEW |