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

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

Issue 1636453002: Use ASCII case-insensitive matching for ident-likes in the CSS parser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Consistent indentation in test. Created 4 years, 11 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/CSSParserValues.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserValues.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserValues.cpp
index 3aa4fe6b96b3a52a59d74cbc9ec60ed6b461a655..22d5adcc221243981b09d605660f22c3995937f5 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserValues.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserValues.cpp
@@ -46,7 +46,7 @@ CSSParserValueList::CSSParserValueList(CSSParserTokenRange range)
CSSParserValue value;
switch (token.type()) {
case FunctionToken: {
- if (token.valueEqualsIgnoringCase("url")) {
+ if (token.valueEqualsIgnoringASCIICase("url")) {
range.consume();
const CSSParserToken& next = range.consumeIncludingWhitespace();
if (next.type() == BadStringToken || range.consume().type() != RightParenthesisToken) {
@@ -59,7 +59,8 @@ CSSParserValueList::CSSParserValueList(CSSParserTokenRange range)
value.m_unit = CSSParserValue::URI;
value.string = next.value();
break;
- } else if (token.valueEqualsIgnoringCase("var")) {
+ }
+ if (token.valueEqualsIgnoringASCIICase("var")) {
destroyAndClear();
return;
}

Powered by Google App Engine
This is Rietveld 408576698