Ignore:
Timestamp:
Mar 10, 2008, 3:06:44 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Darin.

Remove KJS::UChar, use ::UChar instead
http://bugs.webkit.org/show_bug.cgi?id=17017

To functional changes, thus no tests.

  • bindings/js/JSCSSStyleDeclarationCustom.cpp: (WebCore::hasCSSPropertyNamePrefix): (WebCore::cssPropertyName):
  • bindings/js/JSDOMWindowBase.cpp: (WebCore::windowProtoFuncAToB): (WebCore::windowProtoFuncBToA):
  • bindings/js/JSSVGPODTypeWrapper.h:
  • bindings/js/kjs_proxy.cpp: (WebCore::KJSProxy::evaluate):
  • bridge/objc/objc_utility.mm: (KJS::Bindings::throwError):
  • dom/Document.cpp: (WebCore::Document::parseQualifiedName):
  • platform/text/AtomicString.cpp: (WebCore::AtomicString::add):
  • platform/text/String.cpp: (WebCore::String::String): (WebCore::String::operator Identifier): (WebCore::String::operator UString):
  • platform/text/TextCodecICU.cpp: (WebCore::TextCodecICU::decode):
  • svg/SVGAnimatedTemplate.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/function.cpp

    r30871 r30942  
    516516    if (c == '%') {
    517517      int charLen = 0;
    518       if (k <= len - 3 && isASCIIHexDigit(p[1].uc) && isASCIIHexDigit(p[2].uc)) {
    519         const char b0 = Lexer::convertHex(p[1].uc, p[2].uc);
     518      if (k <= len - 3 && isASCIIHexDigit(p[1]) && isASCIIHexDigit(p[2])) {
     519        const char b0 = Lexer::convertHex(p[1], p[2]);
    520520        const int sequenceLen = UTF8SequenceLength(b0);
    521521        if (sequenceLen != 0 && k <= len - sequenceLen * 3) {
     
    525525          for (int i = 1; i < sequenceLen; ++i) {
    526526            const UChar* q = p + i * 3;
    527             if (q[0] == '%' && isASCIIHexDigit(q[1].uc) && isASCIIHexDigit(q[2].uc))
    528               sequence[i] = Lexer::convertHex(q[1].uc, q[2].uc);
     527            if (q[0] == '%' && isASCIIHexDigit(q[1]) && isASCIIHexDigit(q[2]))
     528              sequence[i] = Lexer::convertHex(q[1], q[2]);
    529529            else {
    530530              charLen = 0;
     
    553553        // For that, it's good to support the wonky "%u" syntax for compatibility with WinIE.
    554554        if (k <= len - 6 && p[1] == 'u'
    555             && isASCIIHexDigit(p[2].uc) && isASCIIHexDigit(p[3].uc)
    556             && isASCIIHexDigit(p[4].uc) && isASCIIHexDigit(p[5].uc)) {
     555            && isASCIIHexDigit(p[2]) && isASCIIHexDigit(p[3])
     556            && isASCIIHexDigit(p[4]) && isASCIIHexDigit(p[5])) {
    557557          charLen = 6;
    558           u = Lexer::convertUnicode(p[2].uc, p[3].uc, p[4].uc, p[5].uc);
     558          u = Lexer::convertUnicode(p[2], p[3], p[4], p[5]);
    559559        }
    560560      }
    561       if (charLen && (u.uc == 0 || u.uc >= 128 || !strchr(do_not_unescape, u.low()))) {
     561      if (charLen && (u == 0 || u >= 128 || !strchr(do_not_unescape, u))) {
    562562        c = u;
    563563        k += charLen - 1;
     
    632632    int p = 0;
    633633
    634     while (p < length && isStrWhiteSpace(s[p].uc)) {
     634    while (p < length && isStrWhiteSpace(s[p])) {
    635635        ++p;
    636636    }
     
    663663    double number = 0;
    664664    while (p < length) {
    665         int digit = parseDigit(s[p].uc, radix);
     665        int digit = parseDigit(s[p], radix);
    666666        if (digit == -1)
    667667            break;
     
    691691    int length = s.size();
    692692    int p = 0;
    693     while (p < length && isStrWhiteSpace(s[p].uc)) {
     693    while (p < length && isStrWhiteSpace(s[p])) {
    694694        ++p;
    695695    }
     
    817817    const UChar* c = str.data();
    818818    for (int k = 0; k < str.size(); k++, c++) {
    819         int u = c->uc;
     819        int u = c[0];
    820820        if (u > 255) {
    821821            char tmp[7];
     
    842842        const UChar* c = str.data() + k;
    843843        UChar u;
    844         if (*c == UChar('%') && k <= len - 6 && *(c + 1) == UChar('u')) {
    845             if (Lexer::isHexDigit((c + 2)->uc) && Lexer::isHexDigit((c + 3)->uc) && Lexer::isHexDigit((c + 4)->uc) && Lexer::isHexDigit((c + 5)->uc)) {
    846                 u = Lexer::convertUnicode((c + 2)->uc, (c + 3)->uc, (c + 4)->uc, (c + 5)->uc);
     844        if (c[0] == '%' && k <= len - 6 && c[1] == 'u') {
     845            if (Lexer::isHexDigit(c[2]) && Lexer::isHexDigit(c[3]) && Lexer::isHexDigit(c[4]) && Lexer::isHexDigit(c[5])) {
     846                u = Lexer::convertUnicode(c[2], c[3], c[4], c[5]);
    847847                c = &u;
    848848                k += 5;
    849849            }
    850         } else if (*c == UChar('%') && k <= len - 3 && Lexer::isHexDigit((c + 1)->uc) && Lexer::isHexDigit((c + 2)->uc)) {
    851             u = UChar(Lexer::convertHex((c+1)->uc, (c+2)->uc));
     850        } else if (c[0] == '%' && k <= len - 3 && Lexer::isHexDigit(c[1]) && Lexer::isHexDigit(c[2])) {
     851            u = UChar(Lexer::convertHex(c[1], c[2]));
    852852            c = &u;
    853853            k += 2;
Note: See TracChangeset for help on using the changeset viewer.