| Index: third_party/WebKit/Source/core/css/parser/CSSParser.cpp
|
| diff --git a/third_party/WebKit/Source/core/css/parser/CSSParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
|
| index 4e84fa1a883d67b3d19ca6a19f7a3410cdde14ea..fc5ce6a683c96af1e8db903b1177230c048f7e9e 100644
|
| --- a/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
|
| +++ b/third_party/WebKit/Source/core/css/parser/CSSParser.cpp
|
| @@ -17,6 +17,7 @@
|
| #include "core/css/parser/CSSSelectorParser.h"
|
| #include "core/css/parser/CSSSupportsParser.h"
|
| #include "core/css/parser/CSSTokenizer.h"
|
| +#include "core/css/parser/CSSVariableParser.h"
|
| #include "core/layout/LayoutTheme.h"
|
|
|
| namespace blink {
|
| @@ -69,6 +70,20 @@ bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID u
|
| return parseValue(declaration, unresolvedProperty, string, important, context);
|
| }
|
|
|
| +bool CSSParser::parseValueForCustomProperty(MutableStylePropertySet* declaration, const AtomicString& propertyName, const String& value, bool important, StyleSheetContents* styleSheet)
|
| +{
|
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled() && CSSVariableParser::isValidVariableName(propertyName));
|
| + if (value.isEmpty())
|
| + return false;
|
| + CSSParserMode parserMode = declaration->cssParserMode();
|
| + CSSParserContext context(parserMode, 0);
|
| + if (styleSheet) {
|
| + context = styleSheet->parserContext();
|
| + context.setMode(parserMode);
|
| + }
|
| + return CSSParserImpl::parseVariableValue(declaration, propertyName, value, important, context);
|
| +}
|
| +
|
| bool CSSParser::parseValue(MutableStylePropertySet* declaration, CSSPropertyID unresolvedProperty, const String& string, bool important, const CSSParserContext& context)
|
| {
|
| return CSSParserImpl::parseValue(declaration, unresolvedProperty, string, important, context);
|
|
|