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

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

Issue 2006413002: Avoid calling lower() on inline styles in parseKeywordValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/CSSParserFastPaths.cpp
diff --git a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
index 2fc2a0c8185e4acd717d354e62ad42e334ca5684..cb911a5d40600fb73b1c1f6574c0a2479051f8a7 100644
--- a/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
+++ b/third_party/WebKit/Source/core/css/parser/CSSParserFastPaths.cpp
@@ -836,8 +836,7 @@ static CSSValue* parseKeywordValue(CSSPropertyID propertyId, const String& strin
if (!CSSParserFastPaths::isKeywordPropertyID(propertyId)) {
// All properties accept the values of "initial" and "inherit".
- String lowerCaseString = string.lower();
- if (lowerCaseString != "initial" && lowerCaseString != "inherit")
+ if (!equalIgnoringASCIICase(string, "initial") && !equalIgnoringASCIICase(string, "inherit"))
return nullptr;
// Parse initial/inherit shorthands using the CSSPropertyParser.

Powered by Google App Engine
This is Rietveld 408576698