summaryrefslogtreecommitdiff
path: root/core/fxcrt/css
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-03-12 15:44:36 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-03-12 15:44:36 +0000
commit735eda96cf24349d10b160c8f5bd363b73d8aba1 (patch)
treef5ed61b45536165d9955236c8a30f89b87233e8e /core/fxcrt/css
parent15c0fccfeff5bf389b494a828c89adb3207c73d6 (diff)
downloadpdfium-735eda96cf24349d10b160c8f5bd363b73d8aba1.tar.xz
Remove all usages of FXSYS_iswASCIIalpha
Instances are either replaced with FXSYS_iswalpha, which calls out to the ICU library to do the proper Unicode operations, or have been converted to a isascii && isalpha pair, if ASCII alpha is actually what was wanted. BUG=pdfium:1035 Change-Id: I971ff639ee1ff818ad08793a1900a8bcbb0a3e04 Reviewed-on: https://pdfium-review.googlesource.com/28450 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcrt/css')
-rw-r--r--core/fxcrt/css/cfx_cssselector.cpp2
-rw-r--r--core/fxcrt/css/cfx_csssyntaxparser.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/core/fxcrt/css/cfx_cssselector.cpp b/core/fxcrt/css/cfx_cssselector.cpp
index 8a22b12287..510114f2e5 100644
--- a/core/fxcrt/css/cfx_cssselector.cpp
+++ b/core/fxcrt/css/cfx_cssselector.cpp
@@ -67,7 +67,7 @@ std::unique_ptr<CFX_CSSSelector> CFX_CSSSelector::FromString(
std::unique_ptr<CFX_CSSSelector> pFirst = nullptr;
for (psz = pStart; psz < pEnd;) {
wchar_t wch = *psz;
- if (FXSYS_iswASCIIalpha(wch) || wch == '*') {
+ if ((isascii(wch) && isalpha(wch)) || wch == '*') {
int32_t iNameLen = wch == '*' ? 1 : GetCSSNameLen(psz, pEnd);
auto p = pdfium::MakeUnique<CFX_CSSSelector>(CFX_CSSSelectorType::Element,
psz, iNameLen, true);
diff --git a/core/fxcrt/css/cfx_csssyntaxparser.cpp b/core/fxcrt/css/cfx_csssyntaxparser.cpp
index fea951f1ec..97586dc59f 100644
--- a/core/fxcrt/css/cfx_csssyntaxparser.cpp
+++ b/core/fxcrt/css/cfx_csssyntaxparser.cpp
@@ -18,7 +18,8 @@
namespace {
bool IsSelectorStart(wchar_t wch) {
- return wch == '.' || wch == '#' || wch == '*' || FXSYS_iswASCIIalpha(wch);
+ return wch == '.' || wch == '#' || wch == '*' ||
+ (isascii(wch) && isalpha(wch));
}
} // namespace