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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSSelectorParser.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/CSSSelectorParser.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
index 6d32983eafcfb7473836d9da13772c5ca97bcedb..0701ab8c6a45dced253801d8de9980986ad3ebcd 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp
@@ -574,7 +574,7 @@ CSSSelector::Relation CSSSelectorParser::consumeCombinator(CSSParserTokenRange&
return fallbackResult;
range.consume();
const CSSParserToken& ident = range.consume();
- if (ident.type() != IdentToken || !ident.valueEqualsIgnoringCase("deep"))
+ if (ident.type() != IdentToken || !ident.valueEqualsIgnoringASCIICase("deep"))
m_failedParsing = true;
const CSSParserToken& slash = range.consumeIncludingWhitespace();
if (slash.type() != DelimiterToken || slash.delimiter() != '/')
@@ -610,7 +610,7 @@ CSSSelector::AttributeMatchType CSSSelectorParser::consumeAttributeFlags(CSSPars
if (range.peek().type() != IdentToken)
return CSSSelector::CaseSensitive;
const CSSParserToken& flag = range.consumeIncludingWhitespace();
- if (flag.valueEqualsIgnoringCase("i"))
+ if (flag.valueEqualsIgnoringASCIICase("i"))
return CSSSelector::CaseInsensitive;
m_failedParsing = true;
return CSSSelector::CaseSensitive;
@@ -624,11 +624,11 @@ bool CSSSelectorParser::consumeANPlusB(CSSParserTokenRange& range, std::pair<int
return true;
}
if (token.type() == IdentToken) {
- if (token.valueEqualsIgnoringCase("odd")) {
+ if (token.valueEqualsIgnoringASCIICase("odd")) {
result = std::make_pair(2, 1);
return true;
}
- if (token.valueEqualsIgnoringCase("even")) {
+ if (token.valueEqualsIgnoringASCIICase("even")) {
result = std::make_pair(2, 0);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698