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

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

Issue 2346193002: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Replaced ASSERTs with DCHECKS in presubmit warnings 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 d149f5e843bd9279ccf4f28b06e260f3dbd39750..cf6a5995902cc7b6cfb7029448a259b07e14f1eb 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 "wtf/PtrUtil.h"
@@ -76,8 +77,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;
@@ -120,13 +121,13 @@ 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(before == after);
#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