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

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

Issue 273903002: Web Animations API: Length properties responsive to style changes (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 7 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
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;
« Source/core/animation/Interpolation.cpp ('K') | « Source/core/animation/InterpolationTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698