| 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/AngleSVGInterpolation.h" | 8 #include "core/animation/AngleSVGInterpolation.h" |
| 9 #include "core/animation/CSSColorInterpolationType.h" |
| 10 #include "core/animation/CSSImageInterpolationType.h" |
| 11 #include "core/animation/CSSImageListInterpolationType.h" |
| 12 #include "core/animation/CSSLengthInterpolationType.h" |
| 13 #include "core/animation/CSSNumberInterpolationType.h" |
| 14 #include "core/animation/CSSPaintInterpolationType.h" |
| 15 #include "core/animation/CSSShadowListInterpolationType.h" |
| 9 #include "core/animation/CSSValueInterpolationType.h" | 16 #include "core/animation/CSSValueInterpolationType.h" |
| 10 #include "core/animation/ColorInterpolationType.h" | |
| 11 #include "core/animation/CompositorAnimations.h" | 17 #include "core/animation/CompositorAnimations.h" |
| 12 #include "core/animation/ConstantStyleInterpolation.h" | 18 #include "core/animation/ConstantStyleInterpolation.h" |
| 13 #include "core/animation/DefaultSVGInterpolation.h" | 19 #include "core/animation/DefaultSVGInterpolation.h" |
| 14 #include "core/animation/DeferredLegacyStyleInterpolation.h" | 20 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
| 15 #include "core/animation/DoubleStyleInterpolation.h" | 21 #include "core/animation/DoubleStyleInterpolation.h" |
| 16 #include "core/animation/FilterStyleInterpolation.h" | 22 #include "core/animation/FilterStyleInterpolation.h" |
| 17 #include "core/animation/ImageInterpolationType.h" | |
| 18 #include "core/animation/ImageListInterpolationType.h" | |
| 19 #include "core/animation/ImageSliceStyleInterpolation.h" | 23 #include "core/animation/ImageSliceStyleInterpolation.h" |
| 20 #include "core/animation/IntegerOptionalIntegerSVGInterpolation.h" | 24 #include "core/animation/IntegerOptionalIntegerSVGInterpolation.h" |
| 21 #include "core/animation/IntegerSVGInterpolation.h" | 25 #include "core/animation/IntegerSVGInterpolation.h" |
| 22 #include "core/animation/InterpolationType.h" | 26 #include "core/animation/InterpolationType.h" |
| 23 #include "core/animation/InvalidatableStyleInterpolation.h" | 27 #include "core/animation/InvalidatableStyleInterpolation.h" |
| 24 #include "core/animation/LegacyStyleInterpolation.h" | 28 #include "core/animation/LegacyStyleInterpolation.h" |
| 25 #include "core/animation/LengthBoxStyleInterpolation.h" | 29 #include "core/animation/LengthBoxStyleInterpolation.h" |
| 26 #include "core/animation/LengthInterpolationType.h" | |
| 27 #include "core/animation/LengthPairStyleInterpolation.h" | 30 #include "core/animation/LengthPairStyleInterpolation.h" |
| 28 #include "core/animation/LengthSVGInterpolation.h" | 31 #include "core/animation/LengthSVGInterpolation.h" |
| 29 #include "core/animation/LengthStyleInterpolation.h" | 32 #include "core/animation/LengthStyleInterpolation.h" |
| 30 #include "core/animation/ListSVGInterpolation.h" | 33 #include "core/animation/ListSVGInterpolation.h" |
| 31 #include "core/animation/ListStyleInterpolation.h" | 34 #include "core/animation/ListStyleInterpolation.h" |
| 32 #include "core/animation/NumberInterpolationType.h" | |
| 33 #include "core/animation/NumberOptionalNumberSVGInterpolation.h" | 35 #include "core/animation/NumberOptionalNumberSVGInterpolation.h" |
| 34 #include "core/animation/NumberSVGInterpolation.h" | 36 #include "core/animation/NumberSVGInterpolation.h" |
| 35 #include "core/animation/PaintInterpolationType.h" | |
| 36 #include "core/animation/PathSVGInterpolation.h" | 37 #include "core/animation/PathSVGInterpolation.h" |
| 37 #include "core/animation/PointSVGInterpolation.h" | 38 #include "core/animation/PointSVGInterpolation.h" |
| 38 #include "core/animation/RectSVGInterpolation.h" | 39 #include "core/animation/RectSVGInterpolation.h" |
| 39 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" | 40 #include "core/animation/SVGStrokeDasharrayStyleInterpolation.h" |
| 40 #include "core/animation/ShadowListInterpolationType.h" | |
| 41 #include "core/animation/TransformSVGInterpolation.h" | 41 #include "core/animation/TransformSVGInterpolation.h" |
| 42 #include "core/animation/VisibilityStyleInterpolation.h" | 42 #include "core/animation/VisibilityStyleInterpolation.h" |
| 43 #include "core/animation/css/CSSAnimations.h" | 43 #include "core/animation/css/CSSAnimations.h" |
| 44 #include "core/css/CSSPropertyMetadata.h" | 44 #include "core/css/CSSPropertyMetadata.h" |
| 45 #include "core/css/resolver/StyleResolver.h" | 45 #include "core/css/resolver/StyleResolver.h" |
| 46 #include "core/style/ComputedStyle.h" | 46 #include "core/style/ComputedStyle.h" |
| 47 #include "core/svg/SVGElement.h" | 47 #include "core/svg/SVGElement.h" |
| 48 #include "platform/RuntimeEnabledFeatures.h" | 48 #include "platform/RuntimeEnabledFeatures.h" |
| 49 | 49 |
| 50 namespace blink { | 50 namespace blink { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 case CSSPropertyWebkitColumnWidth: | 184 case CSSPropertyWebkitColumnWidth: |
| 185 case CSSPropertyWebkitPerspectiveOriginX: | 185 case CSSPropertyWebkitPerspectiveOriginX: |
| 186 case CSSPropertyWebkitPerspectiveOriginY: | 186 case CSSPropertyWebkitPerspectiveOriginY: |
| 187 case CSSPropertyWebkitTransformOriginX: | 187 case CSSPropertyWebkitTransformOriginX: |
| 188 case CSSPropertyWebkitTransformOriginY: | 188 case CSSPropertyWebkitTransformOriginY: |
| 189 case CSSPropertyWebkitTransformOriginZ: | 189 case CSSPropertyWebkitTransformOriginZ: |
| 190 case CSSPropertyWidth: | 190 case CSSPropertyWidth: |
| 191 case CSSPropertyWordSpacing: | 191 case CSSPropertyWordSpacing: |
| 192 case CSSPropertyX: | 192 case CSSPropertyX: |
| 193 case CSSPropertyY: | 193 case CSSPropertyY: |
| 194 applicableTypes->append(new LengthInterpolationType(property)); | 194 applicableTypes->append(new CSSLengthInterpolationType(property)); |
| 195 break; | 195 break; |
| 196 case CSSPropertyFlexGrow: | 196 case CSSPropertyFlexGrow: |
| 197 case CSSPropertyFlexShrink: | 197 case CSSPropertyFlexShrink: |
| 198 case CSSPropertyFillOpacity: | 198 case CSSPropertyFillOpacity: |
| 199 case CSSPropertyFloodOpacity: | 199 case CSSPropertyFloodOpacity: |
| 200 case CSSPropertyFontSizeAdjust: | 200 case CSSPropertyFontSizeAdjust: |
| 201 case CSSPropertyOpacity: | 201 case CSSPropertyOpacity: |
| 202 case CSSPropertyOrphans: | 202 case CSSPropertyOrphans: |
| 203 case CSSPropertyShapeImageThreshold: | 203 case CSSPropertyShapeImageThreshold: |
| 204 case CSSPropertyStopOpacity: | 204 case CSSPropertyStopOpacity: |
| 205 case CSSPropertyStrokeMiterlimit: | 205 case CSSPropertyStrokeMiterlimit: |
| 206 case CSSPropertyStrokeOpacity: | 206 case CSSPropertyStrokeOpacity: |
| 207 case CSSPropertyWebkitColumnCount: | 207 case CSSPropertyWebkitColumnCount: |
| 208 case CSSPropertyWidows: | 208 case CSSPropertyWidows: |
| 209 case CSSPropertyZIndex: | 209 case CSSPropertyZIndex: |
| 210 applicableTypes->append(new NumberInterpolationType(property)); | 210 applicableTypes->append(new CSSNumberInterpolationType(property)); |
| 211 break; | 211 break; |
| 212 case CSSPropertyLineHeight: | 212 case CSSPropertyLineHeight: |
| 213 applicableTypes->append(new LengthInterpolationType(property)); | 213 applicableTypes->append(new CSSLengthInterpolationType(property)); |
| 214 applicableTypes->append(new NumberInterpolationType(property)); | 214 applicableTypes->append(new CSSNumberInterpolationType(property)); |
| 215 break; | 215 break; |
| 216 case CSSPropertyBackgroundColor: | 216 case CSSPropertyBackgroundColor: |
| 217 case CSSPropertyBorderBottomColor: | 217 case CSSPropertyBorderBottomColor: |
| 218 case CSSPropertyBorderLeftColor: | 218 case CSSPropertyBorderLeftColor: |
| 219 case CSSPropertyBorderRightColor: | 219 case CSSPropertyBorderRightColor: |
| 220 case CSSPropertyBorderTopColor: | 220 case CSSPropertyBorderTopColor: |
| 221 case CSSPropertyColor: | 221 case CSSPropertyColor: |
| 222 case CSSPropertyFloodColor: | 222 case CSSPropertyFloodColor: |
| 223 case CSSPropertyLightingColor: | 223 case CSSPropertyLightingColor: |
| 224 case CSSPropertyOutlineColor: | 224 case CSSPropertyOutlineColor: |
| 225 case CSSPropertyStopColor: | 225 case CSSPropertyStopColor: |
| 226 case CSSPropertyTextDecorationColor: | 226 case CSSPropertyTextDecorationColor: |
| 227 case CSSPropertyWebkitColumnRuleColor: | 227 case CSSPropertyWebkitColumnRuleColor: |
| 228 case CSSPropertyWebkitTextStrokeColor: | 228 case CSSPropertyWebkitTextStrokeColor: |
| 229 applicableTypes->append(new ColorInterpolationType(property)); | 229 applicableTypes->append(new CSSColorInterpolationType(property)); |
| 230 break; | 230 break; |
| 231 case CSSPropertyFill: | 231 case CSSPropertyFill: |
| 232 case CSSPropertyStroke: | 232 case CSSPropertyStroke: |
| 233 applicableTypes->append(new PaintInterpolationType(property)); | 233 applicableTypes->append(new CSSPaintInterpolationType(property)); |
| 234 break; | 234 break; |
| 235 case CSSPropertyBoxShadow: | 235 case CSSPropertyBoxShadow: |
| 236 case CSSPropertyTextShadow: | 236 case CSSPropertyTextShadow: |
| 237 applicableTypes->append(new ShadowListInterpolationType(property)); | 237 applicableTypes->append(new CSSShadowListInterpolationType(property)); |
| 238 break; | 238 break; |
| 239 case CSSPropertyBorderImageSource: | 239 case CSSPropertyBorderImageSource: |
| 240 case CSSPropertyListStyleImage: | 240 case CSSPropertyListStyleImage: |
| 241 case CSSPropertyWebkitMaskBoxImageSource: | 241 case CSSPropertyWebkitMaskBoxImageSource: |
| 242 applicableTypes->append(new ImageInterpolationType(property)); | 242 applicableTypes->append(new CSSImageInterpolationType(property)); |
| 243 break; | 243 break; |
| 244 case CSSPropertyBackgroundImage: | 244 case CSSPropertyBackgroundImage: |
| 245 case CSSPropertyWebkitMaskImage: | 245 case CSSPropertyWebkitMaskImage: |
| 246 applicableTypes->append(new ImageListInterpolationType(property)); | 246 applicableTypes->append(new CSSImageListInterpolationType(property)); |
| 247 break; | 247 break; |
| 248 default: | 248 default: |
| 249 // TODO(alancutter): Support all interpolable CSS properties here so we
can stop falling back to the old StyleInterpolation implementation. | 249 // TODO(alancutter): Support all interpolable CSS properties here so we
can stop falling back to the old StyleInterpolation implementation. |
| 250 if (CSSPropertyMetadata::isInterpolableProperty(property)) { | 250 if (CSSPropertyMetadata::isInterpolableProperty(property)) { |
| 251 delete applicableTypes; | 251 delete applicableTypes; |
| 252 applicableTypesMap.add(property, nullptr); | 252 applicableTypesMap.add(property, nullptr); |
| 253 return nullptr; | 253 return nullptr; |
| 254 } | 254 } |
| 255 break; | 255 break; |
| 256 } | 256 } |
| (...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); | 534 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); |
| 535 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 535 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
| 536 | 536 |
| 537 if (!fromValue || !toValue) | 537 if (!fromValue || !toValue) |
| 538 return nullptr; | 538 return nullptr; |
| 539 | 539 |
| 540 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); | 540 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); |
| 541 } | 541 } |
| 542 | 542 |
| 543 } // namespace blink | 543 } // namespace blink |
| OLD | NEW |