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

Unified Diff: third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp

Issue 1192983003: CSS Custom Properties (Variables) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Post-merge 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/parser/LegacyCSSPropertyParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
index bcbfc3bec3a9240da7dbfe4afde97a6ec43df21f..8a3860f03ed14dde0bdda27cc9bb9ee7a11a1c77 100644
--- a/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/LegacyCSSPropertyParser.cpp
@@ -415,6 +415,13 @@ bool CSSPropertyParser::parseValue(CSSPropertyID unresolvedProperty, bool import
return true;
}
+ if (RuntimeEnabledFeatures::cssVariablesEnabled() && value->unit() == CSSPrimitiveValue::UnitType::VariableReference) {
Timothy Loh 2015/09/30 02:09:28 OK to be here for now, eventually we'll have to mo
+ // We don't expand the shorthand here because crazypants.
+ m_parsedProperties.append(CSSProperty(propId, CSSPrimitiveValue::create(value->variableData), important, false, 0, m_implicitShorthand));
+ m_valueList->next();
+ return true;
+ }
+
if (CSSParserFastPaths::isKeywordPropertyID(propId)) {
if (!CSSParserFastPaths::isValidKeywordPropertyAndValue(propId, id))
return false;

Powered by Google App Engine
This is Rietveld 408576698