| 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/XLinkNames.h" | 7 #include "core/XLinkNames.h" |
| 8 #include "core/animation/CSSColorInterpolationType.h" | 8 #include "core/animation/CSSColorInterpolationType.h" |
| 9 #include "core/animation/CSSFontWeightInterpolationType.h" | 9 #include "core/animation/CSSFontWeightInterpolationType.h" |
| 10 #include "core/animation/CSSImageInterpolationType.h" | 10 #include "core/animation/CSSImageInterpolationType.h" |
| 11 #include "core/animation/CSSImageListInterpolationType.h" | 11 #include "core/animation/CSSImageListInterpolationType.h" |
| 12 #include "core/animation/CSSLengthInterpolationType.h" | 12 #include "core/animation/CSSLengthInterpolationType.h" |
| 13 #include "core/animation/CSSLengthListInterpolationType.h" | 13 #include "core/animation/CSSLengthListInterpolationType.h" |
| 14 #include "core/animation/CSSNumberInterpolationType.h" | 14 #include "core/animation/CSSNumberInterpolationType.h" |
| 15 #include "core/animation/CSSPaintInterpolationType.h" | 15 #include "core/animation/CSSPaintInterpolationType.h" |
| 16 #include "core/animation/CSSShadowListInterpolationType.h" | 16 #include "core/animation/CSSShadowListInterpolationType.h" |
| 17 #include "core/animation/CSSValueInterpolationType.h" | 17 #include "core/animation/CSSValueInterpolationType.h" |
| 18 #include "core/animation/CSSVisibilityInterpolationType.h" |
| 18 #include "core/animation/CompositorAnimations.h" | 19 #include "core/animation/CompositorAnimations.h" |
| 19 #include "core/animation/ConstantStyleInterpolation.h" | 20 #include "core/animation/ConstantStyleInterpolation.h" |
| 20 #include "core/animation/DefaultSVGInterpolation.h" | 21 #include "core/animation/DefaultSVGInterpolation.h" |
| 21 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 22 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
| 22 #include "core/animation/DoubleStyleInterpolation.h" | 23 #include "core/animation/DoubleStyleInterpolation.h" |
| 23 #include "core/animation/FilterStyleInterpolation.h" | 24 #include "core/animation/FilterStyleInterpolation.h" |
| 24 #include "core/animation/ImageSliceStyleInterpolation.h" | 25 #include "core/animation/ImageSliceStyleInterpolation.h" |
| 25 #include "core/animation/InterpolationType.h" | 26 #include "core/animation/InterpolationType.h" |
| 26 #include "core/animation/InvalidatableInterpolation.h" | 27 #include "core/animation/InvalidatableInterpolation.h" |
| 27 #include "core/animation/LegacyStyleInterpolation.h" | 28 #include "core/animation/LegacyStyleInterpolation.h" |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 case CSSPropertyBackgroundImage: | 254 case CSSPropertyBackgroundImage: |
| 254 case CSSPropertyWebkitMaskImage: | 255 case CSSPropertyWebkitMaskImage: |
| 255 applicableTypes->append(adoptPtr(new CSSImageListInterpolationType(c
ssProperty))); | 256 applicableTypes->append(adoptPtr(new CSSImageListInterpolationType(c
ssProperty))); |
| 256 break; | 257 break; |
| 257 case CSSPropertyStrokeDasharray: | 258 case CSSPropertyStrokeDasharray: |
| 258 applicableTypes->append(adoptPtr(new CSSLengthListInterpolationType(
cssProperty))); | 259 applicableTypes->append(adoptPtr(new CSSLengthListInterpolationType(
cssProperty))); |
| 259 break; | 260 break; |
| 260 case CSSPropertyFontWeight: | 261 case CSSPropertyFontWeight: |
| 261 applicableTypes->append(adoptPtr(new CSSFontWeightInterpolationType(
cssProperty))); | 262 applicableTypes->append(adoptPtr(new CSSFontWeightInterpolationType(
cssProperty))); |
| 262 break; | 263 break; |
| 264 case CSSPropertyVisibility: |
| 265 applicableTypes->append(adoptPtr(new CSSVisibilityInterpolationType(
cssProperty))); |
| 266 break; |
| 263 default: | 267 default: |
| 264 // TODO(alancutter): Support all interpolable CSS properties here so
we can stop falling back to the old StyleInterpolation implementation. | 268 // TODO(alancutter): Support all interpolable CSS properties here so
we can stop falling back to the old StyleInterpolation implementation. |
| 265 if (CSSPropertyMetadata::isInterpolableProperty(cssProperty)) | 269 if (CSSPropertyMetadata::isInterpolableProperty(cssProperty)) |
| 266 fallbackToLegacy = true; | 270 fallbackToLegacy = true; |
| 267 break; | 271 break; |
| 268 } | 272 } |
| 269 | 273 |
| 270 if (!fallbackToLegacy) | 274 if (!fallbackToLegacy) |
| 271 applicableTypes->append(adoptPtr(new CSSValueInterpolationType(cssPr
operty))); | 275 applicableTypes->append(adoptPtr(new CSSValueInterpolationType(cssPr
operty))); |
| 272 | 276 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); | 646 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); |
| 643 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 647 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
| 644 | 648 |
| 645 if (!fromValue || !toValue) | 649 if (!fromValue || !toValue) |
| 646 return nullptr; | 650 return nullptr; |
| 647 | 651 |
| 648 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute); | 652 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute); |
| 649 } | 653 } |
| 650 | 654 |
| 651 } // namespace blink | 655 } // namespace blink |
| OLD | NEW |