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

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: Rebase 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 ddda9452c119a23e0d79a6327a675424c7a11606..5c310fe006c073c9e8aa19edff0feb59aa4359ce 100644
--- a/Source/core/animation/StringKeyframe.cpp
+++ b/Source/core/animation/StringKeyframe.cpp
@@ -68,17 +68,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 and CSSPropertyOutlineWidth
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:
+ 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;

Powered by Google App Engine
This is Rietveld 408576698