• darin@apple.com's avatar
    text-transform: lowercase is not lang-dependent (Turkish languages : tr,az) · ab049848
    darin@apple.com authored
    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.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156948 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ab049848
EventHandler.cpp 156 KB