| 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 "config.h" | 5 #include "config.h" |
| 6 #include "core/animation/StringKeyframe.h" | 6 #include "core/animation/StringKeyframe.h" |
| 7 | 7 |
| 8 #include "core/animation/ColorStyleInterpolation.h" | 8 #include "core/animation/ColorStyleInterpolation.h" |
| 9 #include "core/animation/CompositorAnimations.h" | 9 #include "core/animation/CompositorAnimations.h" |
| 10 #include "core/animation/ConstantStyleInterpolation.h" | 10 #include "core/animation/ConstantStyleInterpolation.h" |
| 11 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 11 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
| 12 #include "core/animation/DoubleStyleInterpolation.h" | 12 #include "core/animation/DoubleStyleInterpolation.h" |
| 13 #include "core/animation/ImageSliceStyleInterpolation.h" |
| 13 #include "core/animation/ImageStyleInterpolation.h" | 14 #include "core/animation/ImageStyleInterpolation.h" |
| 14 #include "core/animation/LegacyStyleInterpolation.h" | 15 #include "core/animation/LegacyStyleInterpolation.h" |
| 15 #include "core/animation/LengthBoxStyleInterpolation.h" | 16 #include "core/animation/LengthBoxStyleInterpolation.h" |
| 16 #include "core/animation/LengthPairStyleInterpolation.h" | 17 #include "core/animation/LengthPairStyleInterpolation.h" |
| 17 #include "core/animation/LengthStyleInterpolation.h" | 18 #include "core/animation/LengthStyleInterpolation.h" |
| 18 #include "core/animation/ListStyleInterpolation.h" | 19 #include "core/animation/ListStyleInterpolation.h" |
| 19 #include "core/animation/SVGLengthStyleInterpolation.h" | 20 #include "core/animation/SVGLengthStyleInterpolation.h" |
| 20 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" | 21 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" |
| 21 #include "core/animation/ShadowStyleInterpolation.h" | 22 #include "core/animation/ShadowStyleInterpolation.h" |
| 22 #include "core/animation/VisibilityStyleInterpolation.h" | 23 #include "core/animation/VisibilityStyleInterpolation.h" |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 break; | 314 break; |
| 314 } | 315 } |
| 315 | 316 |
| 316 // FIXME: Handle interpolation from/to none, unspecified color values | 317 // FIXME: Handle interpolation from/to none, unspecified color values |
| 317 fallBackToLegacy = true; | 318 fallBackToLegacy = true; |
| 318 | 319 |
| 319 break; | 320 break; |
| 320 | 321 |
| 321 } | 322 } |
| 322 | 323 |
| 323 case CSSPropertyClip: | 324 case CSSPropertyClip: { |
| 324 case CSSPropertyBorderImageSlice: | |
| 325 case CSSPropertyWebkitMaskBoxImageSlice: { | |
| 326 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { | 325 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { |
| 327 forceDefaultInterpolation = true; | 326 forceDefaultInterpolation = true; |
| 328 break; | 327 break; |
| 329 } | 328 } |
| 330 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); | 329 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); |
| 331 if (interpolation) | 330 if (interpolation) |
| 332 return interpolation.release(); | 331 return interpolation.release(); |
| 333 break; | 332 break; |
| 334 } | 333 } |
| 335 | 334 |
| 335 case CSSPropertyBorderImageSlice: |
| 336 case CSSPropertyWebkitMaskBoxImageSlice: { |
| 337 RefPtrWillBeRawPtr<Interpolation> interpolation = ImageSliceStyleInterpo
lation::maybeCreate(*fromCSSValue, *toCSSValue, property); |
| 338 if (interpolation) |
| 339 return interpolation.release(); |
| 340 if (ImageSliceStyleInterpolation::usesDefaultInterpolation(*fromCSSValue
, *toCSSValue)) |
| 341 forceDefaultInterpolation = true; |
| 342 |
| 343 break; |
| 344 } |
| 345 |
| 336 case CSSPropertyStrokeWidth: { | 346 case CSSPropertyStrokeWidth: { |
| 337 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol
ation::maybeCreate(*fromCSSValue, *toCSSValue, property, RangeNonNegative); | 347 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol
ation::maybeCreate(*fromCSSValue, *toCSSValue, property, RangeNonNegative); |
| 338 if (interpolation) | 348 if (interpolation) |
| 339 return interpolation.release(); | 349 return interpolation.release(); |
| 340 | 350 |
| 341 break; | 351 break; |
| 342 } | 352 } |
| 343 case CSSPropertyStrokeDasharray: { | 353 case CSSPropertyStrokeDasharray: { |
| 344 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); | 354 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); |
| 345 if (interpolation) | 355 if (interpolation) |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 407 } |
| 398 | 408 |
| 399 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 409 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
| 400 { | 410 { |
| 401 visitor->trace(m_value); | 411 visitor->trace(m_value); |
| 402 visitor->trace(m_animatableValueCache); | 412 visitor->trace(m_animatableValueCache); |
| 403 Keyframe::PropertySpecificKeyframe::trace(visitor); | 413 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 404 } | 414 } |
| 405 | 415 |
| 406 } | 416 } |
| OLD | NEW |