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

Unified Diff: third_party/WebKit/Source/core/animation/CSSClipInterpolationType.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/CSSClipInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
index a24cd4249940f5dc8297ef9538fbd4e665a2e4f6..c5593dec03b30d41af1bb00911c9e4da5bbaa32d 100644
--- a/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSClipInterpolationType.cpp
@@ -5,6 +5,7 @@
#include "core/animation/CSSClipInterpolationType.h"
#include "core/animation/LengthInterpolationFunctions.h"
+#include "core/css/CSSIdentifierValue.h"
#include "core/css/CSSQuadValue.h"
#include "core/css/resolver/StyleResolverState.h"
#include "wtf/PtrUtil.h"
@@ -191,12 +192,12 @@ InterpolationValue CSSClipInterpolationType::maybeConvertInherit(const StyleReso
return createClipValue(state.parentStyle()->clip(), state.parentStyle()->effectiveZoom());
}
-static bool isCSSAuto(const CSSPrimitiveValue& value)
+static bool isCSSAuto(const CSSValue& value)
{
- return value.getValueID() == CSSValueAuto;
+ return value.isIdentifierValue() && toCSSIdentifierValue(value).getValueID() == CSSValueAuto;
}
-static std::unique_ptr<InterpolableValue> convertClipComponent(const CSSPrimitiveValue& length)
+static std::unique_ptr<InterpolableValue> convertClipComponent(const CSSValue& length)
{
if (isCSSAuto(length))
return InterpolableList::create(0);

Powered by Google App Engine
This is Rietveld 408576698