Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp |
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp |
| index 59c96a646cdd6bc98f2765b1a43d5e7d62918f6a..1e5c72dd9397741719e278615f1d37fe7cb5fb8b 100644 |
| --- a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp |
| +++ b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp |
| @@ -766,7 +766,8 @@ void CSSParserImpl::consumeDeclaration(CSSParserTokenRange range, StyleRule::Rul |
| } |
| size_t propertiesCount = m_parsedProperties.size(); |
| - if (unresolvedProperty == CSSPropertyInvalid && CSSVariableParser::isValidVariableName(token)) { |
| + // TODO(timloh): Shouldn't this only be for StyleRule::Style? |
|
rune
2016/08/29 07:48:42
Yes, and it's observable as a bug. Reported 641873
Timothy Loh
2016/08/29 08:15:50
Done.
|
| + if (unresolvedProperty == CSSPropertyVariable) { |
| AtomicString variableName = token.value().toAtomicString(); |
| consumeVariableValue(range.makeSubRange(&range.peek(), declarationValueEnd), variableName, important); |
| } |
| @@ -774,7 +775,7 @@ void CSSParserImpl::consumeDeclaration(CSSParserTokenRange range, StyleRule::Rul |
| if (important && (ruleType == StyleRule::FontFace || ruleType == StyleRule::Keyframe)) |
| return; |
| - if (unresolvedProperty != CSSPropertyInvalid) { |
| + if (unresolvedProperty != CSSPropertyInvalid && unresolvedProperty != CSSPropertyVariable) { |
| if (m_styleSheet && m_styleSheet->singleOwnerDocument()) |
| Deprecation::warnOnDeprecatedProperties(m_styleSheet->singleOwnerDocument()->frame(), unresolvedProperty); |
| consumeDeclarationValue(range.makeSubRange(&range.peek(), declarationValueEnd), unresolvedProperty, important, ruleType); |