Chromium Code Reviews| Index: Source/core/animation/StringKeyframe.cpp |
| diff --git a/Source/core/animation/StringKeyframe.cpp b/Source/core/animation/StringKeyframe.cpp |
| index 0bab1b0b156dc68f408fa197ef7ebee7c515f2d0..af7ff9a590b5d2cdf79b42a3dce7250983d0dc5f 100644 |
| --- a/Source/core/animation/StringKeyframe.cpp |
| +++ b/Source/core/animation/StringKeyframe.cpp |
| @@ -8,7 +8,9 @@ |
| #include "core/animation/ColorStyleInterpolation.h" |
| #include "core/animation/DefaultStyleInterpolation.h" |
| #include "core/animation/DeferredLegacyStyleInterpolation.h" |
| +#include "core/animation/DoubleStyleInterpolation.h" |
| #include "core/animation/LegacyStyleInterpolation.h" |
| +#include "core/animation/LengthBoxStyleInterpolation.h" |
| #include "core/animation/LengthStyleInterpolation.h" |
| #include "core/animation/VisibilityStyleInterpolation.h" |
| #include "core/animation/css/CSSAnimations.h" |
| @@ -82,45 +84,89 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe:: |
| case CSSPropertyBorderLeftWidth: |
|
Eric Willigers
2014/12/22 07:35:38
case CSSPropertyBorderBottomWidth:
case CSSPr
jadeg
2015/01/05 23:15:20
Done.
|
| case CSSPropertyBorderRightWidth: |
| case CSSPropertyBorderTopWidth: |
| + case CSSPropertyFillOpacity: |
| + case CSSPropertyFlexGrow: |
| + case CSSPropertyFlexShrink: |
| + case CSSPropertyFloodOpacity: |
| case CSSPropertyFontSize: |
| - case CSSPropertyHeight: |
| + case CSSPropertyLetterSpacing: |
|
Eric Willigers
2014/12/22 07:35:38
letter spacer and word spacing and outline offset
jadeg
2015/01/05 23:15:20
Done.
|
| + case CSSPropertyOrphans: |
|
Eric Willigers
2014/12/22 07:35:38
The following are always integers: orphans webki
jadeg
2015/01/05 23:15:20
Done.
|
| + case CSSPropertyOutlineOffset: |
| + case CSSPropertyOutlineWidth: |
| + case CSSPropertyPerspective: |
| + case CSSPropertyShapeImageThreshold: |
|
Eric Willigers
2014/12/22 07:35:38
shape-image-threshold is clamped 0..1, just like o
jadeg
2015/01/05 23:15:20
Have changed this, but just to note that this clam
|
| + case CSSPropertyStopOpacity: |
| + case CSSPropertyStrokeMiterlimit: |
| + case CSSPropertyStrokeOpacity: |
| + case CSSPropertyWebkitBorderHorizontalSpacing: |
| + case CSSPropertyWebkitBorderVerticalSpacing: |
| + case CSSPropertyWebkitColumnCount: |
| + case CSSPropertyWebkitColumnGap: |
| + case CSSPropertyWebkitColumnRuleWidth: |
| + case CSSPropertyWebkitColumnWidth: |
|
Eric Willigers
2014/12/22 07:35:38
OutlineWidth and Perspective and WebkitBorderHoriz
jadeg
2015/01/05 23:15:20
Done.
|
| + case CSSPropertyWidows: |
| + case CSSPropertyWordSpacing: |
| + case CSSPropertyZIndex: |
| + case CSSPropertyZoom: |
| + if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyleInterpolation::canCreateFrom(*toCSSValue)) |
|
Eric Willigers
2014/12/22 07:35:38
Note that Chrome does not permit negative values f
jadeg
2015/01/05 23:15:20
Just to check, I have found no clamping rules for
jadeg
2015/01/05 23:15:20
Done.
|
| + return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, NoClamp); |
| + break; |
| + case CSSPropertyOpacity: |
| + if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyleInterpolation::canCreateFrom(*toCSSValue)) |
| + return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, ClampOpacity); |
| + break; |
| + |
| case CSSPropertyLineHeight: |
| + if (DoubleStyleInterpolation::canCreateFrom(*fromCSSValue) && DoubleStyleInterpolation::canCreateFrom(*toCSSValue)) |
| + return DoubleStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, NoClamp); |
|
Eric Willigers
2014/12/22 05:02:41
clamp to non-negative values
jadeg
2015/01/05 23:15:20
Done.
|
| + if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInterpolation::canCreateFrom(*toCSSValue)) |
| + return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, range); |
|
Eric Willigers
2014/12/22 05:02:41
ValueRangeNonNegative
jadeg
2015/01/05 23:15:20
Done.
|
| + break; |
| + |
| + case CSSPropertyHeight: |
| case CSSPropertyMaxHeight: |
| case CSSPropertyMaxWidth: |
| case CSSPropertyMinHeight: |
| case CSSPropertyMinWidth: |
| case CSSPropertyMotionPosition: |
| - case CSSPropertyOutlineWidth: |
| case CSSPropertyPaddingBottom: |
| case CSSPropertyPaddingLeft: |
| case CSSPropertyPaddingRight: |
| case CSSPropertyPaddingTop: |
| - case CSSPropertyPerspective: |
| case CSSPropertyShapeMargin: |
| case CSSPropertyWidth: |
| range = ValueRangeNonNegative; |
| // Fall through |
| case CSSPropertyBottom: |
| + case CSSPropertyFlexBasis: |
|
Eric Willigers
2014/12/22 05:02:41
Move CSSPropertyFlexBasis up to use ValueRangeNonN
jadeg
2015/01/05 23:15:20
Done.
|
| case CSSPropertyLeft: |
| - case CSSPropertyLetterSpacing: |
| case CSSPropertyMarginBottom: |
| case CSSPropertyMarginLeft: |
| case CSSPropertyMarginRight: |
| case CSSPropertyMarginTop: |
| - case CSSPropertyOutlineOffset: |
| case CSSPropertyRight: |
| + case CSSPropertyTextIndent: |
| case CSSPropertyTop: |
| case CSSPropertyVerticalAlign: |
| - case CSSPropertyWordSpacing: |
|
Eric Willigers
2014/12/22 05:02:41
Removing
case CSSPropertyLetterSpacing:
case C
jadeg
2015/01/05 23:15:20
Done.
|
| if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInterpolation::canCreateFrom(*toCSSValue)) |
| return LengthStyleInterpolation::create(*fromCSSValue, *toCSSValue, property, range); |
| + break; |
| + |
| + case CSSPropertyBorderImageSlice: |
|
Eric Willigers
2014/12/19 00:16:13
Let's move the two LengthBoxStyleInterpolation cas
jadeg
2015/01/05 23:15:20
Done.
|
| + case CSSPropertyClip: |
| + if (LengthBoxStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthBoxStyleInterpolation::canCreateFrom(*toCSSValue)) |
| + return LengthBoxStyleInterpolation::create(*fromCSSValue, *toCSSValue, property); |
| + break; |
| + |
| case CSSPropertyVisibility: |
| if (VisibilityStyleInterpolation::canCreateFrom(*fromCSSValue) && VisibilityStyleInterpolation::canCreateFrom(*toCSSValue) && (VisibilityStyleInterpolation::isVisible(*fromCSSValue) || VisibilityStyleInterpolation::isVisible(*toCSSValue))) { |
| return VisibilityStyleInterpolation::create(*fromCSSValue, *toCSSValue, property); |
| } |
| break; |
| + |
|
samli
2014/12/22 03:41:15
Remove new line
jadeg
2015/01/05 23:15:20
Done.
|
| case CSSPropertyFill: |
| case CSSPropertyStroke: |
| + |
|
samli
2014/12/22 03:41:15
ditto
jadeg
2015/01/05 23:15:20
Done.
|
| case CSSPropertyBackgroundColor: |
| case CSSPropertyBorderBottomColor: |
| case CSSPropertyBorderLeftColor: |