| 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/SVGStrokeDasharrayStyleInterpolation.h" | 20 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" |
| 20 #include "core/animation/ShadowStyleInterpolation.h" | 21 #include "core/animation/ShadowStyleInterpolation.h" |
| 21 #include "core/animation/VisibilityStyleInterpolation.h" | 22 #include "core/animation/VisibilityStyleInterpolation.h" |
| 22 #include "core/animation/css/CSSAnimations.h" | 23 #include "core/animation/css/CSSAnimations.h" |
| (...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 break; | 304 break; |
| 304 } | 305 } |
| 305 | 306 |
| 306 // FIXME: Handle interpolation from/to none, unspecified color values | 307 // FIXME: Handle interpolation from/to none, unspecified color values |
| 307 fallBackToLegacy = true; | 308 fallBackToLegacy = true; |
| 308 | 309 |
| 309 break; | 310 break; |
| 310 | 311 |
| 311 } | 312 } |
| 312 | 313 |
| 313 case CSSPropertyClip: | 314 case CSSPropertyClip: { |
| 314 case CSSPropertyBorderImageSlice: | |
| 315 case CSSPropertyWebkitMaskBoxImageSlice: { | |
| 316 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { | 315 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { |
| 317 forceDefaultInterpolation = true; | 316 forceDefaultInterpolation = true; |
| 318 break; | 317 break; |
| 319 } | 318 } |
| 320 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); | 319 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); |
| 321 if (interpolation) | 320 if (interpolation) |
| 322 return interpolation.release(); | 321 return interpolation.release(); |
| 323 break; | 322 break; |
| 324 } | 323 } |
| 325 | 324 |
| 325 case CSSPropertyBorderImageSlice: |
| 326 case CSSPropertyWebkitMaskBoxImageSlice: { |
| 327 RefPtrWillBeRawPtr<Interpolation> interpolation = ImageSliceStyleInterpo
lation::maybeCreate(*fromCSSValue, *toCSSValue, property); |
| 328 if (interpolation) |
| 329 return interpolation.release(); |
| 330 if (ImageSliceStyleInterpolation::usesDefaultInterpolation(*fromCSSValue
, *toCSSValue)) |
| 331 forceDefaultInterpolation = true; |
| 332 |
| 333 break; |
| 334 } |
| 335 |
| 326 case CSSPropertyStrokeDasharray: { | 336 case CSSPropertyStrokeDasharray: { |
| 327 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); | 337 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); |
| 328 if (interpolation) | 338 if (interpolation) |
| 329 return interpolation.release(); | 339 return interpolation.release(); |
| 330 | 340 |
| 331 break; | 341 break; |
| 332 } | 342 } |
| 333 | 343 |
| 334 default: | 344 default: |
| 335 // Fall back to LegacyStyleInterpolation. | 345 // Fall back to LegacyStyleInterpolation. |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 } | 391 } |
| 382 | 392 |
| 383 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 393 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
| 384 { | 394 { |
| 385 visitor->trace(m_value); | 395 visitor->trace(m_value); |
| 386 visitor->trace(m_animatableValueCache); | 396 visitor->trace(m_animatableValueCache); |
| 387 Keyframe::PropertySpecificKeyframe::trace(visitor); | 397 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 388 } | 398 } |
| 389 | 399 |
| 390 } | 400 } |
| OLD | NEW |