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

Unified Diff: third_party/WebKit/Source/core/animation/CSSTextIndentInterpolationType.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/CSSTextIndentInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSTextIndentInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSTextIndentInterpolationType.cpp
index d36bef3caf88aa6dc4fd234a4ec4b1b95af1f421..2262a81248b5d802194337131cbb257b875095e9 100644
--- a/third_party/WebKit/Source/core/animation/CSSTextIndentInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSTextIndentInterpolationType.cpp
@@ -5,6 +5,7 @@
#include "core/animation/CSSTextIndentInterpolationType.h"
#include "core/animation/LengthInterpolationFunctions.h"
+#include "core/css/CSSIdentifierValue.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/CSSValueList.h"
#include "core/css/resolver/StyleResolverState.h"
@@ -140,13 +141,12 @@ InterpolationValue CSSTextIndentInterpolationType::maybeConvertValue(const CSSVa
TextIndentType type = ComputedStyle::initialTextIndentType();
for (const auto& item : toCSSValueList(value)) {
- const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(*item);
- if (primitiveValue.getValueID() == CSSValueEachLine)
+ if (item->isIdentifierValue() && toCSSIdentifierValue(*item).getValueID() == CSSValueEachLine)
line = TextIndentEachLine;
- else if (primitiveValue.getValueID() == CSSValueHanging)
+ else if (item->isIdentifierValue() && toCSSIdentifierValue(*item).getValueID() == CSSValueHanging)
type = TextIndentHanging;
else
- length = LengthInterpolationFunctions::maybeConvertCSSValue(primitiveValue);
+ length = LengthInterpolationFunctions::maybeConvertCSSValue(*item);
}
DCHECK(length);

Powered by Google App Engine
This is Rietveld 408576698