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

Unified Diff: third_party/WebKit/Source/core/dom/DOMImplementation.cpp

Issue 2508033004: Reduce unnecessary usage of TextCaseSensitivity::TextCaseInsensitive. (Closed)
Patch Set: Created 4 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/dom/DOMImplementation.cpp
diff --git a/third_party/WebKit/Source/core/dom/DOMImplementation.cpp b/third_party/WebKit/Source/core/dom/DOMImplementation.cpp
index b6ef0586b9945e82e4c4a19b9dcd28dce67695e9..93c95f8082d067b704d164f35dfbbb978f3d6c6f 100644
--- a/third_party/WebKit/Source/core/dom/DOMImplementation.cpp
+++ b/third_party/WebKit/Source/core/dom/DOMImplementation.cpp
@@ -125,7 +125,7 @@ bool DOMImplementation::isXMLMIMEType(const String& mimeType) {
return false;
if (mimeType[0] == '/' || mimeType[length - 5] == '/' ||
- !mimeType.endsWith("+xml", TextCaseInsensitive))
+ !mimeType.endsWith("+xml", TextCaseASCIIInsensitive))
return false;
bool hasSlash = false;
@@ -170,10 +170,10 @@ bool DOMImplementation::isXMLMIMEType(const String& mimeType) {
}
bool DOMImplementation::isJSONMIMEType(const String& mimeType) {
- if (mimeType.startsWith("application/json", TextCaseInsensitive))
+ if (mimeType.startsWith("application/json", TextCaseASCIIInsensitive))
return true;
- if (mimeType.startsWith("application/", TextCaseInsensitive)) {
- size_t subtype = mimeType.find("+json", 12, TextCaseInsensitive);
+ if (mimeType.startsWith("application/", TextCaseASCIIInsensitive)) {
+ size_t subtype = mimeType.find("+json", 12, TextCaseASCIIInsensitive);
if (subtype != kNotFound) {
// Just check that a parameter wasn't matched.
size_t parameterMarker = mimeType.find(";");
@@ -189,7 +189,7 @@ bool DOMImplementation::isJSONMIMEType(const String& mimeType) {
}
static bool isTextPlainType(const String& mimeType) {
- return mimeType.startsWith("text/", TextCaseInsensitive) &&
+ return mimeType.startsWith("text/", TextCaseASCIIInsensitive) &&
!(equalIgnoringCase(mimeType, "text/html") ||
equalIgnoringCase(mimeType, "text/xml") ||
equalIgnoringCase(mimeType, "text/xsl"));
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontFaceSrcValue.cpp ('k') | third_party/WebKit/Source/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698