Changeset 156948 in webkit


Ignore:
Timestamp:
Oct 4, 2013 11:38:33 PM (11 years ago)
Author:
Darin Adler
Message:

text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
https://bugs.webkit.org/show_bug.cgi?id=21312

Reviewed by Ryosuke Niwa.

Source/WebCore:

Test: fast/text/text-transform-turkish-and-azeri.html

This patch covers text-transform: uppercase and text-transform: lowercase.
More changes will be needed to cover text-transform: capitalize.

  • inspector/DOMPatchSupport.cpp:

(WebCore::DOMPatchSupport::patchNode): Use String::upper instead of String::makeUpper.

  • page/EventHandler.cpp:

(WebCore::findDropZone): Use String::lower instead of String::makeLower.

  • platform/graphics/harfbuzz/HarfBuzzShaper.cpp:

(WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use String::upper instead of String::makeUpper.

  • platform/network/blackberry/rss/RSS10Parser.cpp: [Seriously, how is an RSS parser

part of WebKit's networking layer? Where are the tests that cover this? Seems wrong
to have this code in the project.]
(WebCore::RSS10Parser::parseXmlDoc): Use lower instead of makeLower.
(WebCore::RSS10Parser::parseItem): Ditto.
(WebCore::RSS10Parser::parseFeed): Ditto.

  • platform/network/blackberry/rss/RSS20Parser.cpp:

(WebCore::RSS20Parser::parseXmlDoc): Ditto.
(WebCore::RSS20Parser::parseItem): Ditto.
(WebCore::RSS20Parser::parseFeed): Ditto.
(WebCore::RSS20Parser::parseEnclosure): Ditto.

  • platform/network/blackberry/rss/RSSAtomParser.cpp:

(WebCore::RSSAtomParser::parseXmlDoc): Ditto.
(WebCore::RSSAtomParser::parseItem): Ditto.
(WebCore::RSSAtomParser::parseFeed): Ditto.
(WebCore::RSSAtomParser::parseLink): Ditto.
(WebCore::RSSAtomParser::parseContent): Ditto.
(WebCore::RSSAtomParser::parseAuthor): Ditto.
(WebCore::RSSAtomParser::parseCategory): Ditto.

  • platform/text/win/LocaleWin.cpp:

(WebCore::convertLocaleNameToLCID): Use String::lower instead of String::makeLower.

  • rendering/RenderText.cpp:

(WebCore::applyTextTransform): Use String::upper and String::lower instead of
String::makeUpper and String::makeLower, and also pass in the locale to each.

  • xml/XMLHttpRequest.cpp:

(WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Changed this so it doesn't call
upper just to return an already known string constant.

Source/WebKit/gtk:

  • WebCoreSupport/DumpRenderTreeSupportGtk.cpp:

(DumpRenderTreeSupportGtk::doCommand): Use StringImpl::upper instead of
StringImpl::makeUpper.

Source/WTF:

  • wtf/text/StringImpl.cpp:

(WTF::StringImpl::upper): Removed an extra call that would unnecessarily reallocate
a StringImpl in the general non-ASCII case. Added an overload that takes a locale identifier.
(WTF::StringImpl::lower): Ditto.

  • wtf/text/StringImpl.h: Ditto.
  • wtf/text/WTFString.cpp:

(WTF::String::lower): Ditto.
(WTF::String::upper): Ditto.

  • wtf/text/WTFString.h: Ditto. Also deleted the makeLower and makeUpper functions since they

offer no advantages over the lower and upper functions. Also added a constructor that takes
a RefPtr<StringImpl> with move construction to help.

LayoutTests:

  • fast/text/text-transform-turkish-and-azeri-expected.html: Added.
  • fast/text/text-transform-turkish-and-azeri.html: Added.
Location:
trunk
Files:
2 added
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r156947 r156948  
     12013-10-04  Darin Adler  <darin@apple.com>
     2
     3        text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
     4        https://bugs.webkit.org/show_bug.cgi?id=21312
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * fast/text/text-transform-turkish-and-azeri-expected.html: Added.
     9        * fast/text/text-transform-turkish-and-azeri.html: Added.
     10
    1112013-10-04  Alexey Proskuryakov  <ap@apple.com>
    212
  • trunk/Source/WTF/ChangeLog

    r156935 r156948  
     12013-10-04  Darin Adler  <darin@apple.com>
     2
     3        text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
     4        https://bugs.webkit.org/show_bug.cgi?id=21312
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * wtf/text/StringImpl.cpp:
     9        (WTF::StringImpl::upper): Removed an extra call that would unnecessarily reallocate
     10        a StringImpl in the general non-ASCII case. Added an overload that takes a locale identifier.
     11        (WTF::StringImpl::lower): Ditto.
     12        * wtf/text/StringImpl.h: Ditto.
     13        * wtf/text/WTFString.cpp:
     14        (WTF::String::lower): Ditto.
     15        (WTF::String::upper): Ditto.
     16        * wtf/text/WTFString.h: Ditto. Also deleted the makeLower and makeUpper functions since they
     17        offer no advantages over the lower and upper functions. Also added a constructor that takes
     18        a RefPtr<StringImpl> with move construction to help.
     19
    1202013-10-04  Brent Fulgham  <bfulgham@apple.com>
    221
  • trunk/Source/WTF/wtf/text/StringImpl.cpp

    r156775 r156948  
    553553    // Do a slower implementation for cases that include non-ASCII characters.
    554554    bool error;
    555     newImpl = createUninitialized(m_length, data16);
    556555    int32_t realLength = Unicode::toUpper(data16, length, source16, m_length, &error);
    557556    if (!error && realLength == length)
     
    564563}
    565564
     565static inline bool needsTurkishCasingRules(const AtomicString& localeIdentifier)
     566{
     567    // Either "tr" or "az" locale, with case sensitive comparison and allowing for an ignored subtag.
     568    UChar first = localeIdentifier[0];
     569    UChar second = localeIdentifier[1];
     570    return ((isASCIIAlphaCaselessEqual(first, 't') && isASCIIAlphaCaselessEqual(second, 'r'))
     571        || (isASCIIAlphaCaselessEqual(first, 'a') && isASCIIAlphaCaselessEqual(second, 'z')))
     572        && (localeIdentifier.length() == 2 || localeIdentifier[2] == '-');
     573}
     574
     575RefPtr<StringImpl> StringImpl::lower(const AtomicString& localeIdentifier)
     576{
     577#if !USE(ICU_UNICODE)
     578    UNUSED_PARAM(localeIdentifier);
     579    return lower();
     580#else
     581    // Use the more-optimized code path most of the time.
     582    // Assuming here that the only locale-specific lowercasing is the Turkish casing rules.
     583    // FIXME: Could possibly optimize further by looking for the specific sequences
     584    // that have locale-specific lowercasing. There are only three of them.
     585    if (!needsTurkishCasingRules(localeIdentifier))
     586        return lower();
     587
     588    // FIXME: Could share more code with the main StringImpl::lower by factoring out
     589    // this last part into a shared function that takes a locale string, since this is
     590    // just like the end of that function.
     591
     592    if (m_length > static_cast<unsigned>(numeric_limits<int32_t>::max()))
     593        CRASH();
     594    int length = m_length;
     595
     596    // Below, we pass in the hardcoded locale "tr". Passing that is more efficient than
     597    // allocating memory just to turn localeIdentifier into a C string, and we assume
     598    // there is no difference between the uppercasing for "tr" and "az" locales.
     599    const UChar* source16 = characters();
     600    UChar* data16;
     601    RefPtr<StringImpl> newString = createUninitialized(length, data16);
     602    UErrorCode status = U_ZERO_ERROR;
     603    int realLength = u_strToLower(data16, length, source16, length, "tr", &status);
     604    if (U_SUCCESS(status) && realLength == length)
     605        return newString;
     606    status = U_ZERO_ERROR;
     607    newString = createUninitialized(realLength, data16);
     608    u_strToLower(data16, realLength, source16, length, "tr", &status);
     609    if (U_FAILURE(status))
     610        return this;
     611    return newString.release();
     612#endif
     613}
     614
     615RefPtr<StringImpl> StringImpl::upper(const AtomicString& localeIdentifier)
     616{
     617#if !USE(ICU_UNICODE)
     618    UNUSED_PARAM(localeIdentifier);
     619    return upper();
     620#else
     621    // Use the more-optimized code path most of the time.
     622    // Assuming here that the only locale-specific lowercasing is the Turkish casing rules,
     623    // and that the only affected character is lowercase "i".
     624    if (!needsTurkishCasingRules(localeIdentifier) || find('i') == notFound)
     625        return upper();
     626
     627    if (m_length > static_cast<unsigned>(numeric_limits<int32_t>::max()))
     628        CRASH();
     629    int length = m_length;
     630
     631    // Below, we pass in the hardcoded locale "tr". Passing that is more efficient than
     632    // allocating memory just to turn localeIdentifier into a C string, and we assume
     633    // there is no difference between the uppercasing for "tr" and "az" locales.
     634    const UChar* source16 = characters();
     635    UChar* data16;
     636    RefPtr<StringImpl> newString = createUninitialized(length, data16);
     637    UErrorCode status = U_ZERO_ERROR;
     638    int realLength = u_strToUpper(data16, length, source16, length, "tr", &status);
     639    if (U_SUCCESS(status) && realLength == length)
     640        return newString;
     641    newString = createUninitialized(realLength, data16);
     642    status = U_ZERO_ERROR;
     643    u_strToUpper(data16, realLength, source16, length, "tr", &status);
     644    if (U_FAILURE(status))
     645        return this;
     646    return newString.release();
     647#endif
     648}
     649
    566650PassRefPtr<StringImpl> StringImpl::fill(UChar character)
    567651{
    568     if (!m_length)
    569         return this;
    570 
    571652    if (!(character & ~0x7F)) {
    572653        LChar* data;
  • trunk/Source/WTF/wtf/text/StringImpl.h

    r156910 r156948  
    691691    WTF_EXPORT_STRING_API PassRefPtr<StringImpl> lower();
    692692    WTF_EXPORT_STRING_API PassRefPtr<StringImpl> upper();
     693    WTF_EXPORT_STRING_API RefPtr<StringImpl> lower(const AtomicString& localeIdentifier);
     694    WTF_EXPORT_STRING_API RefPtr<StringImpl> upper(const AtomicString& localeIdentifier);
    693695
    694696    WTF_EXPORT_STRING_API PassRefPtr<StringImpl> fill(UChar);
  • trunk/Source/WTF/wtf/text/WTFString.cpp

    r156775 r156948  
    334334}
    335335
     336String String::lower(const AtomicString& localeIdentifier) const
     337{
     338    if (!m_impl)
     339        return String();
     340    return m_impl->lower(localeIdentifier);
     341}
     342
     343String String::upper(const AtomicString& localeIdentifier) const
     344{
     345    if (!m_impl)
     346        return String();
     347    return m_impl->upper(localeIdentifier);
     348}
     349
    336350String String::stripWhiteSpace() const
    337351{
  • trunk/Source/WTF/wtf/text/WTFString.h

    r156775 r156948  
    123123    String(StringImpl* impl) : m_impl(impl) { }
    124124    String(PassRefPtr<StringImpl> impl) : m_impl(impl) { }
     125    String(RefPtr<StringImpl>&& impl) : m_impl(impl) { }
    125126
    126127    // Construct a string from a constant string literal.
     
    319320    }
    320321
    321     void makeLower() { if (m_impl) m_impl = m_impl->lower(); }
    322     void makeUpper() { if (m_impl) m_impl = m_impl->upper(); }
    323322    void fill(UChar c) { if (m_impl) m_impl = m_impl->fill(c); }
    324323
     
    334333    WTF_EXPORT_STRING_API String lower() const;
    335334    WTF_EXPORT_STRING_API String upper() const;
     335
     336    WTF_EXPORT_STRING_API String lower(const AtomicString& localeIdentifier) const;
     337    WTF_EXPORT_STRING_API String upper(const AtomicString& localeIdentifier) const;
    336338
    337339    WTF_EXPORT_STRING_API String stripWhiteSpace() const;
  • trunk/Source/WebCore/ChangeLog

    r156947 r156948  
     12013-10-04  Darin Adler  <darin@apple.com>
     2
     3        text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
     4        https://bugs.webkit.org/show_bug.cgi?id=21312
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Test: fast/text/text-transform-turkish-and-azeri.html
     9
     10        This patch covers text-transform: uppercase and text-transform: lowercase.
     11        More changes will be needed to cover text-transform: capitalize.
     12
     13        * inspector/DOMPatchSupport.cpp:
     14        (WebCore::DOMPatchSupport::patchNode): Use String::upper instead of String::makeUpper.
     15        * page/EventHandler.cpp:
     16        (WebCore::findDropZone): Use String::lower instead of String::makeLower.
     17        * platform/graphics/harfbuzz/HarfBuzzShaper.cpp:
     18        (WebCore::HarfBuzzShaper::shapeHarfBuzzRuns): Use String::upper instead of String::makeUpper.
     19        * platform/network/blackberry/rss/RSS10Parser.cpp: [Seriously, how is an RSS parser
     20        part of WebKit's networking layer? Where are the tests that cover this? Seems wrong
     21        to have this code in the project.]
     22        (WebCore::RSS10Parser::parseXmlDoc): Use lower instead of makeLower.
     23        (WebCore::RSS10Parser::parseItem): Ditto.
     24        (WebCore::RSS10Parser::parseFeed): Ditto.
     25        * platform/network/blackberry/rss/RSS20Parser.cpp:
     26        (WebCore::RSS20Parser::parseXmlDoc): Ditto.
     27        (WebCore::RSS20Parser::parseItem): Ditto.
     28        (WebCore::RSS20Parser::parseFeed): Ditto.
     29        (WebCore::RSS20Parser::parseEnclosure): Ditto.
     30        * platform/network/blackberry/rss/RSSAtomParser.cpp:
     31        (WebCore::RSSAtomParser::parseXmlDoc): Ditto.
     32        (WebCore::RSSAtomParser::parseItem): Ditto.
     33        (WebCore::RSSAtomParser::parseFeed): Ditto.
     34        (WebCore::RSSAtomParser::parseLink): Ditto.
     35        (WebCore::RSSAtomParser::parseContent): Ditto.
     36        (WebCore::RSSAtomParser::parseAuthor): Ditto.
     37        (WebCore::RSSAtomParser::parseCategory): Ditto.
     38        * platform/text/win/LocaleWin.cpp:
     39        (WebCore::convertLocaleNameToLCID): Use String::lower instead of String::makeLower.
     40        * rendering/RenderText.cpp:
     41        (WebCore::applyTextTransform): Use String::upper and String::lower instead of
     42        String::makeUpper and String::makeLower, and also pass in the locale to each.
     43        * xml/XMLHttpRequest.cpp:
     44        (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Changed this so it doesn't call
     45        upper just to return an already known string constant.
     46
    1472013-10-04  Alexey Proskuryakov  <ap@apple.com>
    248
  • trunk/Source/WebCore/inspector/DOMPatchSupport.cpp

    r156550 r156948  
    143143
    144144    // Compose the new list.
    145     String markupCopy = markup;
    146     markupCopy.makeLower();
     145    String markupCopy = markup.lower();
    147146    Vector<OwnPtr<Digest> > newList;
    148147    for (Node* child = parentNode->firstChild(); child != node; child = child->nextSibling())
  • trunk/Source/WebCore/page/EventHandler.cpp

    r156815 r156948  
    20622062            continue;
    20632063       
    2064         dropZoneStr.makeLower();
     2064        dropZoneStr = dropZoneStr.lower();
    20652065       
    20662066        SpaceSplitString keywords(dropZoneStr, false);
  • trunk/Source/WebCore/platform/graphics/harfbuzz/HarfBuzzShaper.cpp

    r156015 r156948  
    495495
    496496        if (m_font->isSmallCaps() && u_islower(m_normalizedBuffer[currentRun->startIndex()])) {
    497             String upperText = String(m_normalizedBuffer.get() + currentRun->startIndex(), currentRun->numCharacters());
    498             upperText.makeUpper();
     497            String upperText = String(m_normalizedBuffer.get() + currentRun->startIndex(), currentRun->numCharacters()).upper();
    499498            currentFontData = m_font->glyphDataForCharacter(upperText[0], false, SmallCapsVariant).fontData;
    500499            hb_buffer_add_utf16(harfBuzzBuffer.get(), reinterpret_cast<const uint16_t*>(upperText.characters()), currentRun->numCharacters(), 0, currentRun->numCharacters());
  • trunk/Source/WebCore/platform/network/blackberry/rss/RSS10Parser.cpp

    r126230 r156948  
    5454                if (childnode->type == XML_ELEMENT_NODE) {
    5555                    name = String(reinterpret_cast<const char*>(childnode->name));
    56                     name.makeLower();
     56                    name = name.lower();
    5757                    if (name == "channel") {
    5858                        BLACKBERRY_ASSERT(!m_root);
     
    9999    for (; node; node = node->next) {
    100100        String name(reinterpret_cast<const char*>(node->name));
    101         name.makeLower();
     101        name = name.lower();
    102102
    103103        parseItemBaseAttribute(item, name, node);
     
    115115    for (; node; node = node->next) {
    116116        String name(reinterpret_cast<const char*>(node->name));
    117         name.makeLower();
     117        name = name.lower();
    118118
    119119        parseItemBaseAttribute(feed, name, node);
  • trunk/Source/WebCore/platform/network/blackberry/rss/RSS20Parser.cpp

    r126230 r156948  
    4848    for (; node; node = node->next) {
    4949        String name(reinterpret_cast<const char*>(node->name));
    50         name.makeLower();
     50        name = name.lower();
    5151
    5252        if (name == "rss") {
     
    5454            if (channel->type == XML_ELEMENT_NODE) {
    5555                name = reinterpret_cast<const char*>(channel->name);
    56                 name.makeLower();
     56                name = name.lower();
    5757                if (name == "channel")
    5858                    m_root = parseFeed(channel->children);
     
    9191    for (; node; node = node->next) {
    9292        String name(reinterpret_cast<const char*>(node->name));
    93         name.makeLower();
     93        name = name.lower();
    9494
    9595        if (parseItemBaseAttribute(item, name, node))
     
    125125    for (; node; node = node->next) {
    126126        String name(reinterpret_cast<const char*>(node->name));
    127         name.makeLower();
     127        name = name.lower();
    128128
    129129        if (parseItemBaseAttribute(feed, name, node))
     
    149149    for (xmlAttr* attr = node->properties; attr; attr = attr->next) {
    150150        String name(reinterpret_cast<const char*>(attr->name));
    151         name.makeLower();
     151        name = name.lower();
    152152
    153153        if (name == "url")
  • trunk/Source/WebCore/platform/network/blackberry/rss/RSSAtomParser.cpp

    r156550 r156948  
    8181    for (; node; node = node->next) {
    8282        String name(reinterpret_cast<const char*>(node->name));
    83         name.makeLower();
     83        name = name.lower();
    8484
    8585        if (name == "feed") {
     
    122122    for (xmlAttr* attr = node->properties; attr; attr = attr->next) {
    123123        String name(reinterpret_cast<const char*>(attr->name));
    124         name.makeLower();
     124        name = name.lower();
    125125        if (name == "base")
    126126            base = textFromXMLAttr(attr);
     
    130130    for (; node; node = node->next) {
    131131        String name(reinterpret_cast<const char*>(node->name));
    132         name.makeLower();
     132        name = name.lower();
    133133
    134134        if (parseItemBaseAttribute(item, name, node, base))
     
    168168    for (; node; node = node->next) {
    169169        String name(reinterpret_cast<const char*>(node->name));
    170         name.makeLower();
     170        name = name.lower();
    171171
    172172        if (parseItemBaseAttribute(feed, name, node, emptyString()))
     
    194194    for (xmlAttr* attr = node->properties; attr; attr = attr->next) {
    195195        String name(reinterpret_cast<const char*>(attr->name));
    196         name.makeLower();
     196        name = name.lower();
    197197
    198198        if (name == "href")
     
    239239    for (xmlAttr* attr = node->properties; attr; attr = attr->next) {
    240240        String name(reinterpret_cast<const char*>(attr->name));
    241         name.makeLower();
     241        name = name.lower();
    242242
    243243        if (name == "type")
     
    296296    for (node = node->children; node; node = node->next) {
    297297        String name(reinterpret_cast<const char*>(node->name));
    298         name.makeLower();
     298        name = name.lower();
    299299
    300300        if (name == "name")
     
    321321    for (xmlAttr* attr = node->properties; attr; attr = attr->next) {
    322322        String name(reinterpret_cast<const char*>(attr->name));
    323         name.makeLower();
     323        name = name.lower();
    324324
    325325        // If there's a label, we use it, if not, use term attribute, as label is
  • trunk/Source/WebCore/platform/text/win/LocaleWin.cpp

    r152142 r156948  
    110110    DEFINE_STATIC_LOCAL(NameToLCIDMap, map, ());
    111111    ensureNameToLCIDMap(map);
    112     String localeName = String(name).replace('_', '-');
    113     localeName.makeLower();
     112    String localeName = String(name).replace('_', '-').lower();
    114113    do {
    115114        NameToLCIDMap::const_iterator iterator = map.find(localeName);
  • trunk/Source/WebCore/rendering/RenderText.cpp

    r156888 r156948  
    13321332        break;
    13331333    case UPPERCASE:
    1334         text.makeUpper();
     1334        text = text.upper(style->locale());
    13351335        break;
    13361336    case LOWERCASE:
    1337         text.makeLower();
     1337        text = text.lower(style->locale());
    13381338        break;
    13391339    }
  • trunk/Source/WebCore/xml/XMLHttpRequest.cpp

    r156688 r156948  
    453453String XMLHttpRequest::uppercaseKnownHTTPMethod(const String& method)
    454454{
    455     if (equalIgnoringCase(method, "COPY") || equalIgnoringCase(method, "DELETE") || equalIgnoringCase(method, "GET")
    456         || equalIgnoringCase(method, "HEAD") || equalIgnoringCase(method, "INDEX") || equalIgnoringCase(method, "LOCK")
    457         || equalIgnoringCase(method, "M-POST") || equalIgnoringCase(method, "MKCOL") || equalIgnoringCase(method, "MOVE")
    458         || equalIgnoringCase(method, "OPTIONS") || equalIgnoringCase(method, "POST") || equalIgnoringCase(method, "PROPFIND")
    459         || equalIgnoringCase(method, "PROPPATCH") || equalIgnoringCase(method, "PUT") || equalIgnoringCase(method, "UNLOCK")) {
    460         return method.upper();
     455    const char* const methods[] = { "COPY", "DELETE", "GET", "HEAD", "INDEX", "LOCK", "M-POST", "MKCOL", "MOVE", "OPTIONS", "POST", "PROPFIND", "PROPPATCH", "PUT", "UNLOCK" };
     456    for (unsigned i = 0; i < WTF_ARRAY_LENGTH(methods); ++i) {
     457        if (equalIgnoringCase(method, methods[i])) {
     458            // Don't bother allocating a new string if it's already all uppercase.
     459            if (method == methods[i])
     460                break;
     461            return ASCIILiteral(methods[i]);
     462        }
    461463    }
    462464    return method;
  • trunk/Source/WebKit/gtk/ChangeLog

    r156946 r156948  
     12013-10-04  Darin Adler  <darin@apple.com>
     2
     3        text-transform: lowercase is not lang-dependent (Turkish languages : tr,az)
     4        https://bugs.webkit.org/show_bug.cgi?id=21312
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
     9        (DumpRenderTreeSupportGtk::doCommand): Use StringImpl::upper instead of
     10        StringImpl::makeUpper.
     11
    1122013-10-04  Anders Carlsson  <andersca@apple.com>
    213
  • trunk/Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp

    r156683 r156948  
    359359    String firstChar = commandString.left(1);
    360360    commandString = commandString.right(commandString.length() - 1);
    361     firstChar.makeUpper();
    362     commandString.insert(firstChar, 0);
     361    commandString.insert(firstChar.upper(), 0);
    363362
    364363    editor.command(commandString).execute();
Note: See TracChangeset for help on using the changeset viewer.