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

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

Issue 878863002: Animation: Add CSSPropertyClip and CSSPropertyBorderImageSlice to StringKeyframe (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 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 90b68cb8b2e85261872802d33c35f5fb5f89f01a..f15f8fad5bb063861f7ccfdf6f0d05caa8620f60 100644
--- a/Source/core/animation/StringKeyframe.cpp
+++ b/Source/core/animation/StringKeyframe.cpp
@@ -225,11 +225,20 @@ PassRefPtrWillBeRawPtr<Interpolation> StringKeyframe::PropertySpecificKeyframe::
// FIXME: Handle percentages and 2D origins.
fallBackToLegacy = true;
break;
+ case CSSPropertyClip:
+ if (LengthBoxStyleInterpolation::isAutoValue(*fromCSSValue) || LengthBoxStyleInterpolation::isAutoValue(*toCSSValue)) {
+ fallBackToLegacy = true;
dstockwell 2015/01/30 04:34:08 Why aren't we handling auto here?
+ break;
+ }
+ // Fall through
+ case CSSPropertyBorderImageSlice:
case CSSPropertyWebkitMaskBoxImageSlice:
Eric Willigers 2015/01/27 23:21:14 Move opening brace to the end of this line: case
- if (LengthBoxStyleInterpolation::matchingFill(*toCSSValue, *fromCSSValue) && LengthBoxStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyleInterpolation::canCreateFrom(*toCSSValue))
- return LengthBoxStyleInterpolation::createFromBorderImageSlice(*fromCSSValue, *toCSSValue, property);
-
- break;
+ {
+ RefPtrWillBeRawPtr<Interpolation> interpolation = LengthBoxStyleInterpolation::maybeCreateFrom(*fromCSSValue, *toCSSValue, property);
+ if (interpolation)
+ return interpolation.release();
+ break;
+ }
default:
// Fall back to LegacyStyleInterpolation.
fallBackToLegacy = true;

Powered by Google App Engine
This is Rietveld 408576698