OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "core/animation/StringKeyframe.h" | 5 #include "core/animation/StringKeyframe.h" |
6 | 6 |
7 #include "core/StylePropertyShorthand.h" | 7 #include "core/StylePropertyShorthand.h" |
8 #include "core/animation/ConstantStyleInterpolation.h" | 8 #include "core/animation/ConstantStyleInterpolation.h" |
9 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 9 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
10 #include "core/animation/DoubleStyleInterpolation.h" | 10 #include "core/animation/DoubleStyleInterpolation.h" |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 case CSSPropertyBackdropFilter: { | 209 case CSSPropertyBackdropFilter: { |
210 RefPtr<Interpolation> interpolation = FilterStyleInterpolation::maybeCre
ateList(*fromCSSValue, *toCSSValue, property); | 210 RefPtr<Interpolation> interpolation = FilterStyleInterpolation::maybeCre
ateList(*fromCSSValue, *toCSSValue, property); |
211 if (interpolation) | 211 if (interpolation) |
212 return interpolation.release(); | 212 return interpolation.release(); |
213 | 213 |
214 // FIXME: Support drop shadow interpolation. | 214 // FIXME: Support drop shadow interpolation. |
215 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; | 215 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; |
216 break; | 216 break; |
217 } | 217 } |
218 | 218 |
219 case CSSPropertyTranslate: { | |
220 RefPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; | |
221 if (interpolation) | |
222 return interpolation.release(); | |
223 | |
224 // TODO(soonm): Legacy mode is used when from and to cssvaluelist length
does not match. | |
225 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; | |
226 break; | |
227 } | |
228 | |
229 case CSSPropertyScale: { | 219 case CSSPropertyScale: { |
230 RefPtr<Interpolation> interpolation = ListStyleInterpolation<DoubleStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; | 220 RefPtr<Interpolation> interpolation = ListStyleInterpolation<DoubleStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; |
231 if (interpolation) | 221 if (interpolation) |
232 return interpolation.release(); | 222 return interpolation.release(); |
233 | 223 |
234 // TODO(soonm): Legacy mode is used when from and to cssvaluelist length
does not match. | 224 // TODO(soonm): Legacy mode is used when from and to cssvaluelist length
does not match. |
235 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; | 225 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; |
236 break; | 226 break; |
237 } | 227 } |
238 | 228 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 } | 268 } |
279 | 269 |
280 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
, const ComputedStyle*) const | 270 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
, const ComputedStyle*) const |
281 { | 271 { |
282 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); | 272 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); |
283 ASSERT(applicableTypes); | 273 ASSERT(applicableTypes); |
284 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
const_cast<SVGPropertySpecificKeyframe*>(this), &end); | 274 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
const_cast<SVGPropertySpecificKeyframe*>(this), &end); |
285 } | 275 } |
286 | 276 |
287 } // namespace blink | 277 } // namespace blink |
OLD | NEW |