Reviewed by Darin.
authorap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Apr 2006 17:21:52 +0000 (17:21 +0000)
committerap <ap@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 8 Apr 2006 17:21:52 +0000 (17:21 +0000)
commitf90bf84f329bf2e4f552def1d3f43dc8f976beae
tree9e1c022c0d57e4fa04ed8caf6217468623000b1e
parente27be43a722b5a94cb708e166decbe7272d5214b
    Reviewed by Darin.

        - fix http://bugzilla.opendarwin.org/show_bug.cgi?id=8264
        toLowerCase and toUpperCase don't honor special mappings

        Test: fast/js/string-capitalization.html

        * JavaScriptCore.xcodeproj/project.pbxproj: Added KXMLCore::Unicode headers to the project.
        * icu/unicode/putil.h: Added (copied from WebCore).
        * icu/unicode/uiter.h: Ditto.
        * icu/unicode/ustring.h: Ditto.
        * kjs/string_object.cpp:
        (StringProtoFunc::callAsFunction): Use the new KXMLCore::Unicode::toUpper() and toLower().
        * kjs/ustring.cpp: Removed unused (and evil) UChar::toLower() and toUpper().
        * kjs/ustring.h: Ditto.

        * kxmlcore/unicode/Unicode.h: Corrected capitalization of the word Unicode.
        * kxmlcore/unicode/UnicodeCategory.h: Renamed include guard macro to match file name.

        * kxmlcore/unicode/icu/UnicodeIcu.h:
        (KXMLCore::Unicode::toLower): Work on strings, not individual characters. Use ICU root locale.
        (KXMLCore::Unicode::toUpper): Ditto.
        (KXMLCore::Unicode::isFormatChar): Use int32_t, which can hold a complete code point.
        (KXMLCore::Unicode::isSeparatorSpace): Ditto.
        (KXMLCore::Unicode::category): Ditto.
        * kxmlcore/unicode/qt4/UnicodeQt4.h:
        (KXMLCore::Unicode::toLower): Work on strings, not individual characters.
        (KXMLCore::Unicode::toUpper): Ditto.
        (KXMLCore::Unicode::isFormatChar): Use int32_t, which can hold a complete code point.
        (KXMLCore::Unicode::isSeparatorSpace): Ditto.
        (KXMLCore::Unicode::category): Ditto.

        * tests/mozilla/ecma/String/15.5.4.12-1.js: Corrected expected results.
        * tests/mozilla/ecma/String/15.5.4.12-5.js: Corrected expected results.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@13740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
17 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/icu/unicode/putil.h [new file with mode: 0644]
JavaScriptCore/icu/unicode/uiter.h [new file with mode: 0644]
JavaScriptCore/icu/unicode/ustring.h [new file with mode: 0644]
JavaScriptCore/kjs/string_object.cpp
JavaScriptCore/kjs/ustring.cpp
JavaScriptCore/kjs/ustring.h
JavaScriptCore/kxmlcore/unicode/Unicode.h
JavaScriptCore/kxmlcore/unicode/UnicodeCategory.h
JavaScriptCore/kxmlcore/unicode/icu/UnicodeIcu.h
JavaScriptCore/kxmlcore/unicode/qt4/UnicodeQt4.h
JavaScriptCore/tests/mozilla/ecma/String/15.5.4.12-1.js
JavaScriptCore/tests/mozilla/ecma/String/15.5.4.12-5.js
LayoutTests/fast/js/resources/string-capitalization.js [new file with mode: 0644]
LayoutTests/fast/js/string-capitalization-expected.txt [new file with mode: 0644]
LayoutTests/fast/js/string-capitalization.html [new file with mode: 0644]