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

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, 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/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 de5f8a2f3de2c303d5c596146acfe46f960bab66..6053cc91df5f165ecdb2f8a6e13a5ab34fabe39c 100644
--- a/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
+++ b/third_party/WebKit/Source/core/css/resolver/CSSToStyleMap.cpp
@@ -368,12 +368,15 @@ CSSTransitionData::TransitionProperty CSSToStyleMap::mapAnimationProperty(CSSVal
{
if (value->isInitialValue())
return CSSTransitionData::initialProperty();
- if (value->isCustomIdentValue())
- return CSSTransitionData::TransitionProperty(toCSSCustomIdentValue(value)->value());
+ if (value->isCustomIdentValue()) {
+ const CSSCustomIdentValue& customIdentValue = toCSSCustomIdentValue(*value);
+ if (customIdentValue.isKnownPropertyID())
+ return CSSTransitionData::TransitionProperty(customIdentValue.valueAsPropertyID());
+ return CSSTransitionData::TransitionProperty(customIdentValue.value());
+ }
CSSPrimitiveValue* primitiveValue = toCSSPrimitiveValue(value);
- if (primitiveValue->getValueID() == CSSValueNone)
- return CSSTransitionData::TransitionProperty(CSSTransitionData::TransitionNone);
- return CSSTransitionData::TransitionProperty(primitiveValue->getPropertyID());
+ ASSERT(primitiveValue->getValueID() == CSSValueNone);
+ return CSSTransitionData::TransitionProperty(CSSTransitionData::TransitionNone);
}
PassRefPtr<TimingFunction> CSSToStyleMap::mapAnimationTimingFunction(CSSValue* value, bool allowStepMiddle)

Powered by Google App Engine
This is Rietveld 408576698