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

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

Issue 2382653006: Split CSSPrimitiveValue into CSSPrimitiveValue and CSSIdentifierValue (Closed)
Patch Set: Make check-webkit-style happy 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 d1ff3e817531e7926c972178afb032d401ff2f83..345f64bf55bd325ca1427aa5046a50fabb052fe1 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"
@@ -158,14 +159,14 @@ InterpolationValue CSSTextIndentInterpolationType::maybeConvertValue(
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