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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 case CSSPropertyBackdropFilter: { | 244 case CSSPropertyBackdropFilter: { |
245 RefPtr<Interpolation> interpolation = FilterStyleInterpolation::maybeCre
ateList(*fromCSSValue, *toCSSValue, property); | 245 RefPtr<Interpolation> interpolation = FilterStyleInterpolation::maybeCre
ateList(*fromCSSValue, *toCSSValue, property); |
246 if (interpolation) | 246 if (interpolation) |
247 return interpolation.release(); | 247 return interpolation.release(); |
248 | 248 |
249 // FIXME: Support drop shadow interpolation. | 249 // FIXME: Support drop shadow interpolation. |
250 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; | 250 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; |
251 break; | 251 break; |
252 } | 252 } |
253 | 253 |
254 case CSSPropertyTranslate: { | |
255 RefPtr<Interpolation> interpolation = ListStyleInterpolation<LengthStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; | |
256 if (interpolation) | |
257 return interpolation.release(); | |
258 | |
259 // TODO(soonm): Legacy mode is used when from and to cssvaluelist length
does not match. | |
260 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; | |
261 break; | |
262 } | |
263 | |
264 case CSSPropertyScale: { | 254 case CSSPropertyScale: { |
265 RefPtr<Interpolation> interpolation = ListStyleInterpolation<DoubleStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; | 255 RefPtr<Interpolation> interpolation = ListStyleInterpolation<DoubleStyle
Interpolation>::maybeCreateFromList(*fromCSSValue, *toCSSValue, property, range)
; |
266 if (interpolation) | 256 if (interpolation) |
267 return interpolation.release(); | 257 return interpolation.release(); |
268 | 258 |
269 // TODO(soonm): Legacy mode is used when from and to cssvaluelist length
does not match. | 259 // TODO(soonm): Legacy mode is used when from and to cssvaluelist length
does not match. |
270 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; | 260 return createLegacyStyleInterpolation(property, end, element, baseStyle)
; |
271 break; | 261 break; |
272 } | 262 } |
273 | 263 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 } | 316 } |
327 | 317 |
328 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
, const ComputedStyle*) const | 318 PassRefPtr<Interpolation> SVGPropertySpecificKeyframe::maybeCreateInterpolation(
PropertyHandle propertyHandle, Keyframe::PropertySpecificKeyframe& end, Element*
, const ComputedStyle*) const |
329 { | 319 { |
330 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); | 320 const InterpolationTypes* applicableTypes = PropertyInterpolationTypesMappin
g::get(propertyHandle); |
331 ASSERT(applicableTypes); | 321 ASSERT(applicableTypes); |
332 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
*this, end); | 322 return InvalidatableInterpolation::create(propertyHandle, *applicableTypes,
*this, end); |
333 } | 323 } |
334 | 324 |
335 } // namespace blink | 325 } // namespace blink |
OLD | NEW |