Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: Source/core/animation/StringKeyframe.cpp

Issue 1243313002: Migrate the remaining CSS properties interpolable as Lengths to LengthInterpolationType (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add composition tests Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/LengthStyleInterpolation.cpp ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/StringKeyframe.cpp
diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp
index 8f95731a18e56d3a5f0fb65d3db0748fae2ef75e..71315d367d616fa177d2bd2713165f7a44e26b85 100644
--- a/Source/core/animation/StringKeyframe.cpp
+++ b/Source/core/animation/StringKeyframe.cpp
@@ -158,7 +158,57 @@ const Vector<const InterpolationType*>* applicableTypesForProperty(CSSPropertyID
auto applicableTypes = new Vector<const InterpolationType*>();
switch (property) {
+ case CSSPropertyBaselineShift:
+ case CSSPropertyBorderBottomWidth:
+ case CSSPropertyBorderLeftWidth:
+ case CSSPropertyBorderRightWidth:
+ case CSSPropertyBorderTopWidth:
+ case CSSPropertyBottom:
+ case CSSPropertyCx:
+ case CSSPropertyCy:
+ case CSSPropertyFlexBasis:
+ case CSSPropertyHeight:
case CSSPropertyLeft:
+ case CSSPropertyLetterSpacing:
+ case CSSPropertyMarginBottom:
+ case CSSPropertyMarginLeft:
+ case CSSPropertyMarginRight:
+ case CSSPropertyMarginTop:
+ case CSSPropertyMaxHeight:
+ case CSSPropertyMaxWidth:
+ case CSSPropertyMinHeight:
+ case CSSPropertyMinWidth:
+ case CSSPropertyMotionOffset:
+ case CSSPropertyOutlineOffset:
+ case CSSPropertyOutlineWidth:
+ case CSSPropertyPaddingBottom:
+ case CSSPropertyPaddingLeft:
+ case CSSPropertyPaddingRight:
+ case CSSPropertyPaddingTop:
+ case CSSPropertyPerspective:
+ case CSSPropertyR:
+ case CSSPropertyRight:
+ case CSSPropertyRx:
+ case CSSPropertyRy:
+ case CSSPropertyShapeMargin:
+ case CSSPropertyStrokeDashoffset:
+ case CSSPropertyStrokeWidth:
+ case CSSPropertyTop:
+ case CSSPropertyVerticalAlign:
+ case CSSPropertyWebkitBorderHorizontalSpacing:
+ case CSSPropertyWebkitBorderVerticalSpacing:
+ case CSSPropertyWebkitColumnGap:
+ case CSSPropertyWebkitColumnRuleWidth:
+ case CSSPropertyWebkitColumnWidth:
+ case CSSPropertyWebkitPerspectiveOriginX:
+ case CSSPropertyWebkitPerspectiveOriginY:
+ case CSSPropertyWebkitTransformOriginX:
+ case CSSPropertyWebkitTransformOriginY:
+ case CSSPropertyWebkitTransformOriginZ:
+ case CSSPropertyWidth:
+ case CSSPropertyWordSpacing:
+ case CSSPropertyX:
+ case CSSPropertyY:
applicableTypes->append(new LengthInterpolationType(property));
break;
default:
@@ -230,67 +280,14 @@ PassRefPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyframe::maybeCrea
case CSSPropertyLineHeight:
if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInterpolation::canCreateFrom(*toCSSValue))
return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, RangeNonNegative);
-
if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyleInterpolation::canCreateFrom(*toCSSValue))
return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, true, RangeNonNegative);
break;
- case CSSPropertyBorderBottomWidth:
- case CSSPropertyBorderLeftWidth:
- case CSSPropertyBorderRightWidth:
- case CSSPropertyBorderTopWidth:
- case CSSPropertyFlexBasis:
+
case CSSPropertyFontSize:
- case CSSPropertyHeight:
- case CSSPropertyMaxHeight:
- case CSSPropertyMaxWidth:
- case CSSPropertyMinHeight:
- case CSSPropertyMinWidth:
- case CSSPropertyOutlineWidth:
- case CSSPropertyPaddingBottom:
- case CSSPropertyPaddingLeft:
- case CSSPropertyPaddingRight:
- case CSSPropertyPaddingTop:
- case CSSPropertyPerspective:
- case CSSPropertyR:
- case CSSPropertyRx:
- case CSSPropertyRy:
- case CSSPropertyShapeMargin:
- case CSSPropertyStrokeWidth:
- case CSSPropertyWebkitBorderHorizontalSpacing:
- case CSSPropertyWebkitBorderVerticalSpacing:
- case CSSPropertyWebkitColumnGap:
- case CSSPropertyWebkitColumnWidth:
- case CSSPropertyWidth:
- range = RangeNonNegative;
- // Fall through
- case CSSPropertyBaselineShift:
- case CSSPropertyBottom:
- case CSSPropertyCx:
- case CSSPropertyCy:
- case CSSPropertyLeft:
- case CSSPropertyLetterSpacing:
- case CSSPropertyMarginBottom:
- case CSSPropertyMarginLeft:
- case CSSPropertyMarginRight:
- case CSSPropertyMarginTop:
- case CSSPropertyMotionOffset:
- case CSSPropertyOutlineOffset:
- case CSSPropertyRight:
- case CSSPropertyStrokeDashoffset:
- case CSSPropertyTop:
- case CSSPropertyVerticalAlign:
- case CSSPropertyWordSpacing:
- case CSSPropertyWebkitColumnRuleWidth:
- case CSSPropertyWebkitPerspectiveOriginX:
- case CSSPropertyWebkitPerspectiveOriginY:
- case CSSPropertyWebkitTransformOriginX:
- case CSSPropertyWebkitTransformOriginY:
- case CSSPropertyWebkitTransformOriginZ:
- case CSSPropertyX:
- case CSSPropertyY:
- if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue, property) && LengthStyleInterpolation::canCreateFrom(*toCSSValue, property))
- return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, range);
+ if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInterpolation::canCreateFrom(*toCSSValue))
+ return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, RangeNonNegative);
// FIXME: Handle keywords e.g. 'smaller', 'larger'.
if (property == CSSPropertyFontSize)
@@ -301,6 +298,7 @@ PassRefPtr<Interpolation> StringKeyframe::CSSPropertySpecificKeyframe::maybeCrea
return createLegacyStyleInterpolation(property, end, element, baseStyle);
break;
+
case CSSPropertyOrphans:
case CSSPropertyWidows:
case CSSPropertyZIndex:
« no previous file with comments | « Source/core/animation/LengthStyleInterpolation.cpp ('k') | Source/core/style/ComputedStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698