зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1453456
- Remove nsCRT::IsAscii(char16_t) in favor of mozilla::IsAscii. r=froydnj
This commit is contained in:
Родитель
8911c5eb8d
Коммит
a25f0304c2
|
@ -20,6 +20,8 @@
|
|||
# include "prinrval.h"
|
||||
#endif
|
||||
|
||||
using mozilla::IsAscii;
|
||||
|
||||
const double growthRate = 1.2;
|
||||
|
||||
// Bug 183111, editor now replaces multiple spaces with leading
|
||||
|
@ -214,7 +216,7 @@ bool mozTXTToHTMLConv::FindURLStart(const char16_t* aInString,
|
|||
aInString[uint32_t(i)] != '[' && aInString[uint32_t(i)] != '(' &&
|
||||
aInString[uint32_t(i)] != '|' && aInString[uint32_t(i)] != '\\' &&
|
||||
!IsSpace(aInString[uint32_t(i)]) &&
|
||||
(!isEmail || nsCRT::IsAscii(aInString[uint32_t(i)])) &&
|
||||
(!isEmail || IsAscii(aInString[uint32_t(i)])) &&
|
||||
(!isEmail || aInString[uint32_t(i)] != ')');
|
||||
i--)
|
||||
;
|
||||
|
@ -270,7 +272,7 @@ bool mozTXTToHTMLConv::FindURLEnd(const char16_t* aInString,
|
|||
// Disallow non-ascii-characters for email.
|
||||
// Currently correct, but revisit later after standards changed.
|
||||
if (isEmail && (aInString[i] == '(' || aInString[i] == '\'' ||
|
||||
!nsCRT::IsAscii(aInString[i])))
|
||||
!IsAscii(aInString[i])))
|
||||
break;
|
||||
if (aInString[i] == '(') seenOpeningParenthesis = true;
|
||||
if (aInString[i] == '[') seenOpeningSquareBracket = true;
|
||||
|
|
|
@ -93,8 +93,6 @@ inline char NS_ToLower(char aChar) {
|
|||
bool NS_IsUpper(char aChar);
|
||||
bool NS_IsLower(char aChar);
|
||||
|
||||
constexpr bool NS_IsAscii(char16_t aChar) { return (0x0080 > aChar); }
|
||||
|
||||
constexpr bool NS_IsAscii(const char16_t* aString) {
|
||||
while (*aString) {
|
||||
if (0x0080 <= *aString) {
|
||||
|
|
|
@ -89,7 +89,6 @@ class nsCRT {
|
|||
static bool IsUpper(char aChar) { return NS_IsUpper(aChar); }
|
||||
static bool IsLower(char aChar) { return NS_IsLower(aChar); }
|
||||
|
||||
static bool IsAscii(char16_t aChar) { return NS_IsAscii(aChar); }
|
||||
static bool IsAscii(const char16_t* aString) { return NS_IsAscii(aString); }
|
||||
static bool IsAsciiSpace(char16_t aChar) {
|
||||
return NS_IsAsciiWhitespace(aChar);
|
||||
|
|
Загрузка…
Ссылка в новой задаче