Chromium Code Reviews| Index: Source/core/animation/StringKeyframe.cpp |
| diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp |
| index c7124255aece91cecf5e98d473ec7efce8f881a9..3a21d0b330c6281fca3fd042e27425ecc1529b33 100644 |
| --- a/Source/core/animation/StringKeyframe.cpp |
| +++ b/Source/core/animation/StringKeyframe.cpp |
| @@ -66,17 +66,46 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe:: |
| { |
| CSSValue* fromCSSValue = m_value.get(); |
| CSSValue* toCSSValue = toStringPropertySpecificKeyframe(end)->value(); |
| + ValueRange range = ValueRangeAll; |
| if (!CSSAnimations::isAnimatableProperty(property)) |
| return DefaultStyleInterpolation::create(fromCSSValue, toCSSValue, property); |
| + // FIXME: add non-negative CSSPropertyFontSize |
| switch (property) { |
| + case CSSPropertyBorderBottomWidth: |
| + case CSSPropertyBorderLeftWidth: |
| + case CSSPropertyBorderRightWidth: |
| + case CSSPropertyBorderTopWidth: |
| + case CSSPropertyHeight: |
| + case CSSPropertyLineHeight: |
| + case CSSPropertyMaxHeight: |
| + case CSSPropertyMaxWidth: |
| + case CSSPropertyMinHeight: |
| + case CSSPropertyMinWidth: |
| + case CSSPropertyPaddingBottom: |
| + case CSSPropertyPaddingLeft: |
| + case CSSPropertyPaddingRight: |
| + case CSSPropertyPaddingTop: |
| + case CSSPropertyPerspective: |
| + case CSSPropertyShapeMargin: |
| + case CSSPropertyWidth: |
| + range = ValueRangeNonNegative; |
| + // Fall through |
| + case CSSPropertyBottom: |
| case CSSPropertyLeft: |
| + case CSSPropertyLetterSpacing: |
| + case CSSPropertyMarginBottom: |
| + case CSSPropertyMarginLeft: |
| + case CSSPropertyMarginRight: |
| + case CSSPropertyMarginTop: |
| + case CSSPropertyOutlineOffset: |
| case CSSPropertyRight: |
| - case CSSPropertyWidth: |
| - case CSSPropertyHeight: |
| + case CSSPropertyTop: |
| + case CSSPropertyVerticalAlign: |
|
alancutter (OOO until 2018)
2014/05/12 09:17:36
vertical-align is not animatable, we should add a
Eric Willigers
2014/05/12 09:42:37
Done.
|
| + case CSSPropertyWordSpacing: |
| if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInterpolation::canCreateFrom(*toCSSValue)) |
| - return LengthStyleInterpolation::create(fromCSSValue, toCSSValue, property); |
| + return LengthStyleInterpolation::create(fromCSSValue, toCSSValue, property, range); |
| break; |
| default: |
| break; |