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

Unified Diff: third_party/WebKit/Source/wtf/ASCIICType.h

Issue 2221833003: Remove WTF::toASCIILowerUnchecked. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/wtf/ASCIICType.h
diff --git a/third_party/WebKit/Source/wtf/ASCIICType.h b/third_party/WebKit/Source/wtf/ASCIICType.h
index 4d036b3bb19c10f189185913d7ed57f2a366579d..d6e5b3501c0719986927b59b6a56970ec37fe3bf 100644
--- a/third_party/WebKit/Source/wtf/ASCIICType.h
+++ b/third_party/WebKit/Source/wtf/ASCIICType.h
@@ -124,16 +124,6 @@ inline char toASCIILower(char c)
return static_cast<char>(ASCIICaseFoldTable[static_cast<LChar>(c)]);
}
-template<typename CharType> inline CharType toASCIILowerUnchecked(CharType character)
-{
- // This function can be used for comparing any input character
- // to a lowercase English character. The isASCIIAlphaCaselessEqual
- // below should be used for regular comparison of ASCII alpha
- // characters, but switch statements in CSS tokenizer require
- // direct use of this function.
- return character | 0x20;
-}
-
template<typename CharType> inline CharType toASCIIUpper(CharType c)
{
return c & ~((c >= 'a' && c <= 'z') << 5);
@@ -168,7 +158,7 @@ template<typename CharType> inline bool isASCIIAlphaCaselessEqual(CharType cssCh
// This function compares a (preferrably) constant ASCII
// lowercase letter to any input character.
ASSERT(character >= 'a' && character <= 'z');
- return LIKELY(toASCIILowerUnchecked(cssCharacter) == character);
+ return LIKELY((cssCharacter | 0x20) == character);
}
} // namespace WTF
@@ -185,7 +175,6 @@ using WTF::isASCIISpace;
using WTF::isASCIIUpper;
using WTF::toASCIIHexValue;
using WTF::toASCIILower;
-using WTF::toASCIILowerUnchecked;
using WTF::toASCIIUpper;
using WTF::lowerNibbleToASCIIHexDigit;
using WTF::upperNibbleToASCIIHexDigit;

Powered by Google App Engine
This is Rietveld 408576698