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

Unified Diff: third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.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/CSSLengthInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
index bf32c8af46a4f24e3b6a21247d4a37999ee530ff..026e5cd538dedf5a130dfa4af655909c091b1863 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
@@ -8,6 +8,7 @@
#include "core/animation/LengthPropertyFunctions.h"
#include "core/animation/css/CSSAnimatableValueFactory.h"
#include "core/css/CSSCalculationValue.h"
+#include "core/css/CSSIdentifierValue.h"
#include "core/css/resolver/StyleBuilder.h"
#include "core/css/resolver/StyleResolverState.h"
#include "platform/LengthFunctions.h"
@@ -77,8 +78,8 @@ InterpolationValue CSSLengthInterpolationType::maybeConvertInherit(const StyleRe
InterpolationValue CSSLengthInterpolationType::maybeConvertValue(const CSSValue& value, const StyleResolverState&, ConversionCheckers& conversionCheckers) const
{
- if (value.isPrimitiveValue() && toCSSPrimitiveValue(value).isValueID()) {
- CSSValueID valueID = toCSSPrimitiveValue(value).getValueID();
+ if (value.isIdentifierValue()) {
+ CSSValueID valueID = toCSSIdentifierValue(value).getValueID();
double pixels;
if (!LengthPropertyFunctions::getPixelsForKeyword(cssProperty(), valueID, pixels))
return nullptr;
@@ -121,7 +122,7 @@ void CSSLengthInterpolationType::apply(const InterpolableValue& interpolableValu
Length before;
Length after;
DCHECK(LengthPropertyFunctions::getLength(cssProperty(), style, before));
- StyleBuilder::applyProperty(cssProperty(), state, *CSSPrimitiveValue::create(length, zoom));
+ StyleBuilder::applyProperty(cssProperty(), state, *CSSValue::create(length, zoom));
DCHECK(LengthPropertyFunctions::getLength(cssProperty(), style, after));
DCHECK_EQ(before.type(), after.type());
if (before.isSpecified()) {
@@ -132,7 +133,7 @@ void CSSLengthInterpolationType::apply(const InterpolableValue& interpolableValu
#endif
return;
}
- StyleBuilder::applyProperty(cssProperty(), state, *CSSPrimitiveValue::create(length, zoom));
+ StyleBuilder::applyProperty(cssProperty(), state, *CSSValue::create(length, zoom));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698