Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Side by Side Diff: Source/core/animation/KeyframeEffectModel.h

Issue 851693007: Prepare for responsive CSS animations. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Attempt to re-snapshot only if needed Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698