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

Unified Diff: third_party/WebKit/Source/core/animation/SizeInterpolationFunctions.cpp

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Rebase please work Created 4 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
Index: third_party/WebKit/Source/core/animation/SizeInterpolationFunctions.cpp
diff --git a/third_party/WebKit/Source/core/animation/SizeInterpolationFunctions.cpp b/third_party/WebKit/Source/core/animation/SizeInterpolationFunctions.cpp
index 5998eba4b788c1297d9f8111c15d830b81c50bf9..6b5783843ed14d9f993cde53d74336ee8dd8020a 100644
--- a/third_party/WebKit/Source/core/animation/SizeInterpolationFunctions.cpp
+++ b/third_party/WebKit/Source/core/animation/SizeInterpolationFunctions.cpp
@@ -6,6 +6,7 @@
#include "core/animation/LengthInterpolationFunctions.h"
#include "core/animation/UnderlyingValueOwner.h"
+#include "core/css/CSSIdentifierValue.h"
#include "core/css/CSSToLengthConversionData.h"
#include "core/css/CSSValuePair.h"
@@ -90,16 +91,15 @@ InterpolationValue SizeInterpolationFunctions::maybeConvertCSSSizeSide(const CSS
if (value.isValuePair()) {
const CSSValuePair& pair = toCSSValuePair(value);
const CSSValue& side = convertWidth ? pair.first() : pair.second();
- if (side.isPrimitiveValue() && toCSSPrimitiveValue(side).getValueID() == CSSValueAuto)
+ if (side.isIdentifierValue() && toCSSIdentifierValue(side).getValueID() == CSSValueAuto)
return convertKeyword(CSSValueAuto);
return wrapConvertedLength(LengthInterpolationFunctions::maybeConvertCSSValue(side));
}
- if (!value.isPrimitiveValue())
+ if (!value.isIdentifierValue() && !value.isPrimitiveValue())
return nullptr;
- CSSValueID keyword = toCSSPrimitiveValue(value).getValueID();
- if (keyword)
- return convertKeyword(keyword);
+ if (value.isIdentifierValue())
+ return convertKeyword(toCSSIdentifierValue(value).getValueID());
// A single length is equivalent to "<length> auto".
if (convertWidth)

Powered by Google App Engine
This is Rietveld 408576698