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

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

Issue 1405293012: [Variables] Enable get/setProperty and similar APIs from the CSSOM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use static_assert. Created 5 years, 1 month 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/CSSVariableParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp
index 94463b1da72db65a904d8b080e501377ac49d21c..87738009396160b8a0f10b265262df9c49a1599a 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSVariableParser.cpp
@@ -20,6 +20,11 @@ bool CSSVariableParser::isValidVariableName(const CSSParserToken& token)
return value.length() >= 2 && value[0] == '-' && value[1] == '-';
}
+bool CSSVariableParser::isValidVariableName(const String& string)
+{
+ return string.length() >= 2 && string[0] == '-' && string[1] == '-';
+}
+
bool isValidVariableReference(CSSParserTokenRange);
bool classifyBlock(CSSParserTokenRange range, bool& hasReferences, bool isTopLevelBlock = true)

Powered by Google App Engine
This is Rietveld 408576698