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

Unified Diff: third_party/WebKit/Source/core/css/parser/CSSParserImpl.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/CSSParserImpl.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
index 93be952e3cdc4455f546b926a4ba3ca096cb73ed..47300c6a897999dfec368d8391fce2fce1ef1305 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserImpl.cpp
@@ -358,7 +358,7 @@ static AtomicString consumeStringOrURI(CSSParserTokenRange& range)
if (token.type() == StringToken || token.type() == UrlToken)
return range.consumeIncludingWhitespace().value();
- if (token.type() != FunctionToken || !token.valueEqualsIgnoringCase("url"))
+ if (token.type() != FunctionToken || !token.valueEqualsIgnoringASCIICase("url"))
return AtomicString();
CSSParserTokenRange contents = range.consumeBlock();
@@ -700,7 +700,7 @@ void CSSParserImpl::consumeDeclaration(CSSParserTokenRange range, StyleRule::Typ
const CSSParserToken* last = range.end() - 1;
while (last->type() == WhitespaceToken)
--last;
- if (last->type() == IdentToken && last->valueEqualsIgnoringCase("important")) {
+ if (last->type() == IdentToken && last->valueEqualsIgnoringASCIICase("important")) {
--last;
while (last->type() == WhitespaceToken)
--last;
@@ -748,9 +748,9 @@ PassOwnPtr<Vector<double>> CSSParserImpl::consumeKeyframeKeyList(CSSParserTokenR
const CSSParserToken& token = range.consumeIncludingWhitespace();
if (token.type() == PercentageToken && token.numericValue() >= 0 && token.numericValue() <= 100)
result->append(token.numericValue() / 100);
- else if (token.type() == IdentToken && token.valueEqualsIgnoringCase("from"))
+ else if (token.type() == IdentToken && token.valueEqualsIgnoringASCIICase("from"))
result->append(0);
- else if (token.type() == IdentToken && token.valueEqualsIgnoringCase("to"))
+ else if (token.type() == IdentToken && token.valueEqualsIgnoringASCIICase("to"))
result->append(1);
else
return nullptr; // Parser error, invalid value in keyframe selector
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSAtRuleID.cpp ('k') | third_party/WebKit/Source/core/css/parser/CSSParserString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698