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

Unified Diff: third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp

Issue 1373433002: Split out CSSPrimitiveValue's PropertyID into CSSCustomIdentValue (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@split_string
Patch Set: Rebase Created 5 years, 2 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/css/resolver/CSSToStyleMap.cpp
diff --git a/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp b/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
index 9791d32fe95a90f8533312f0d90ac88f995686f3..967086b54cf8db73cadc2d6a479e4b10bb36ee89 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
@@ -366,12 +366,14 @@ CSSTransitionData::TransitionProperty CSSToStyleMap::mapAnimationProperty(const
{
if (value.isInitialValue())
return CSSTransitionData::initialProperty();
- if (value.isCustomIdentValue())
- return CSSTransitionData::TransitionProperty(toCSSCustomIdentValue(value).value());
- const CSSPrimitiveValue& primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue.getValueID() == CSSValueNone)
- return CSSTransitionData::TransitionProperty(CSSTransitionData::TransitionNone);
- return CSSTransitionData::TransitionProperty(primitiveValue.getPropertyID());
+ if (value.isCustomIdentValue()) {
+ const CSSCustomIdentValue& customIdentValue = toCSSCustomIdentValue(value);
+ if (customIdentValue.isKnownPropertyID())
+ return CSSTransitionData::TransitionProperty(customIdentValue.valueAsPropertyID());
+ return CSSTransitionData::TransitionProperty(customIdentValue.value());
+ }
+ ASSERT(toCSSPrimitiveValue(value).getValueID() == CSSValueNone);
+ return CSSTransitionData::TransitionProperty(CSSTransitionData::TransitionNone);
}
PassRefPtr<TimingFunction> CSSToStyleMap::mapAnimationTimingFunction(const CSSValue& value, bool allowStepMiddle)

Powered by Google App Engine
This is Rietveld 408576698