| 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/ImageStyleInterpolation.h" | 13 #include "core/animation/ImageStyleInterpolation.h" |
| 14 #include "core/animation/LegacyStyleInterpolation.h" | 14 #include "core/animation/LegacyStyleInterpolation.h" |
| 15 #include "core/animation/LengthBoxStyleInterpolation.h" | 15 #include "core/animation/LengthBoxStyleInterpolation.h" |
| 16 #include "core/animation/LengthPairStyleInterpolation.h" | 16 #include "core/animation/LengthPairStyleInterpolation.h" |
| 17 #include "core/animation/LengthStyleInterpolation.h" | 17 #include "core/animation/LengthStyleInterpolation.h" |
| 18 #include "core/animation/ListStyleInterpolation.h" | 18 #include "core/animation/ListStyleInterpolation.h" |
| 19 #include "core/animation/SVGLengthStyleInterpolation.h" | |
| 20 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" | 19 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" |
| 21 #include "core/animation/ShadowStyleInterpolation.h" | 20 #include "core/animation/ShadowStyleInterpolation.h" |
| 22 #include "core/animation/VisibilityStyleInterpolation.h" | 21 #include "core/animation/VisibilityStyleInterpolation.h" |
| 23 #include "core/animation/css/CSSAnimations.h" | 22 #include "core/animation/css/CSSAnimations.h" |
| 24 #include "core/css/CSSPropertyMetadata.h" | 23 #include "core/css/CSSPropertyMetadata.h" |
| 25 #include "core/css/resolver/StyleResolver.h" | 24 #include "core/css/resolver/StyleResolver.h" |
| 26 #include "core/layout/style/LayoutStyle.h" | 25 #include "core/layout/style/LayoutStyle.h" |
| 27 | 26 |
| 28 namespace blink { | 27 namespace blink { |
| 29 | 28 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 case CSSPropertyMinHeight: | 164 case CSSPropertyMinHeight: |
| 166 case CSSPropertyMinWidth: | 165 case CSSPropertyMinWidth: |
| 167 case CSSPropertyMotionOffset: | 166 case CSSPropertyMotionOffset: |
| 168 case CSSPropertyOutlineWidth: | 167 case CSSPropertyOutlineWidth: |
| 169 case CSSPropertyPaddingBottom: | 168 case CSSPropertyPaddingBottom: |
| 170 case CSSPropertyPaddingLeft: | 169 case CSSPropertyPaddingLeft: |
| 171 case CSSPropertyPaddingRight: | 170 case CSSPropertyPaddingRight: |
| 172 case CSSPropertyPaddingTop: | 171 case CSSPropertyPaddingTop: |
| 173 case CSSPropertyPerspective: | 172 case CSSPropertyPerspective: |
| 174 case CSSPropertyShapeMargin: | 173 case CSSPropertyShapeMargin: |
| 174 case CSSPropertyStrokeWidth: |
| 175 case CSSPropertyWebkitBorderHorizontalSpacing: | 175 case CSSPropertyWebkitBorderHorizontalSpacing: |
| 176 case CSSPropertyWebkitBorderVerticalSpacing: | 176 case CSSPropertyWebkitBorderVerticalSpacing: |
| 177 case CSSPropertyWebkitColumnGap: | 177 case CSSPropertyWebkitColumnGap: |
| 178 case CSSPropertyWebkitColumnWidth: | 178 case CSSPropertyWebkitColumnWidth: |
| 179 case CSSPropertyWidth: | 179 case CSSPropertyWidth: |
| 180 range = RangeNonNegative; | 180 range = RangeNonNegative; |
| 181 // Fall through | 181 // Fall through |
| 182 case CSSPropertyBaselineShift: | 182 case CSSPropertyBaselineShift: |
| 183 case CSSPropertyBottom: | 183 case CSSPropertyBottom: |
| 184 case CSSPropertyLeft: | 184 case CSSPropertyLeft: |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 326 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { | 326 if (LengthBoxStyleInterpolation::usesDefaultInterpolation(*fromCSSValue,
*toCSSValue)) { |
| 327 forceDefaultInterpolation = true; | 327 forceDefaultInterpolation = true; |
| 328 break; | 328 break; |
| 329 } | 329 } |
| 330 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); | 330 RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpol
ation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property); |
| 331 if (interpolation) | 331 if (interpolation) |
| 332 return interpolation.release(); | 332 return interpolation.release(); |
| 333 break; | 333 break; |
| 334 } | 334 } |
| 335 | 335 |
| 336 case CSSPropertyStrokeWidth: { | |
| 337 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGLengthStyleInterpol
ation::maybeCreate(*fromCSSValue, *toCSSValue, property, RangeNonNegative); | |
| 338 if (interpolation) | |
| 339 return interpolation.release(); | |
| 340 | |
| 341 break; | |
| 342 } | |
| 343 case CSSPropertyStrokeDasharray: { | 336 case CSSPropertyStrokeDasharray: { |
| 344 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); | 337 RefPtrWillBeRawPtr<Interpolation> interpolation = SVGStrokeDasharrayStyl
eInterpolation::maybeCreate(*fromCSSValue, *toCSSValue, property); |
| 345 if (interpolation) | 338 if (interpolation) |
| 346 return interpolation.release(); | 339 return interpolation.release(); |
| 347 | 340 |
| 348 break; | 341 break; |
| 349 } | 342 } |
| 343 |
| 350 default: | 344 default: |
| 351 // Fall back to LegacyStyleInterpolation. | 345 // Fall back to LegacyStyleInterpolation. |
| 352 fallBackToLegacy = true; | 346 fallBackToLegacy = true; |
| 353 break; | 347 break; |
| 354 } | 348 } |
| 355 | 349 |
| 356 if (fromCSSValue == toCSSValue) | 350 if (fromCSSValue == toCSSValue) |
| 357 return ConstantStyleInterpolation::create(fromCSSValue, property); | 351 return ConstantStyleInterpolation::create(fromCSSValue, property); |
| 358 | 352 |
| 359 if (forceDefaultInterpolation) | 353 if (forceDefaultInterpolation) |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 } | 391 } |
| 398 | 392 |
| 399 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) | 393 DEFINE_TRACE(StringKeyframe::PropertySpecificKeyframe) |
| 400 { | 394 { |
| 401 visitor->trace(m_value); | 395 visitor->trace(m_value); |
| 402 visitor->trace(m_animatableValueCache); | 396 visitor->trace(m_animatableValueCache); |
| 403 Keyframe::PropertySpecificKeyframe::trace(visitor); | 397 Keyframe::PropertySpecificKeyframe::trace(visitor); |
| 404 } | 398 } |
| 405 | 399 |
| 406 } | 400 } |
| OLD | NEW |