| Index: third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| index 049f9129408633b4b841f1a889d120b02bd2f1c7..795d84108f0281fc6e69497b2abcf61b90156fa1 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp
|
| @@ -165,6 +165,9 @@ bool CSSPropertyParser::parseValueStart(CSSPropertyID unresolvedProperty, bool i
|
| template <typename CharacterType>
|
| static CSSPropertyID unresolvedCSSPropertyID(const CharacterType* propertyName, unsigned length)
|
| {
|
| + if (length >= 2 && propertyName[0] == '-' && propertyName[1] == '-')
|
| + return CSSPropertyVariable;
|
| +
|
| char buffer[maxCSSPropertyNameLength + 1]; // 1 for null character
|
|
|
| for (unsigned i = 0; i != length; ++i) {
|
| @@ -297,7 +300,7 @@ static CSSValue* consumeWillChange(CSSParserTokenRange& range)
|
| if (range.peek().type() != IdentToken)
|
| return nullptr;
|
| CSSPropertyID unresolvedProperty = unresolvedCSSPropertyID(range.peek().value());
|
| - if (unresolvedProperty) {
|
| + if (unresolvedProperty != CSSPropertyInvalid && unresolvedProperty != CSSPropertyVariable) {
|
| ASSERT(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty));
|
| // Now "all" is used by both CSSValue and CSSPropertyValue.
|
| // Need to return nullptr when currentValue is CSSPropertyAll.
|
| @@ -1128,10 +1131,11 @@ static CSSValue* consumeTransitionProperty(CSSParserTokenRange& range)
|
| if (token.id() == CSSValueNone)
|
| return consumeIdent(range);
|
|
|
| - if (CSSPropertyID property = token.parseAsUnresolvedCSSPropertyID()) {
|
| - ASSERT(CSSPropertyMetadata::isEnabledProperty(property));
|
| + CSSPropertyID unresolvedProperty = token.parseAsUnresolvedCSSPropertyID();
|
| + if (unresolvedProperty != CSSPropertyInvalid && unresolvedProperty != CSSPropertyVariable) {
|
| + DCHECK(CSSPropertyMetadata::isEnabledProperty(unresolvedProperty));
|
| range.consumeIncludingWhitespace();
|
| - return CSSCustomIdentValue::create(property);
|
| + return CSSCustomIdentValue::create(unresolvedProperty);
|
| }
|
| return consumeCustomIdent(range);
|
| }
|
|
|