Skip to content
  • commit-queue@webkit.org's avatar
    Abstract the logic for appending a UChar32 onto StringBuilder · 902c346e
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=107505
    
    Patch by Martin Robinson <mrobinson@igalia.com> on 2013-01-24
    Reviewed by Darin Adler.
    
    Source/WebCore:
    
    * css/CSSOMUtils.cpp:
    (WebCore::serializeCharacter): Use the new StringBuilder append.
    (WebCore::serializeIdentifier): Ditto.
    (WebCore::serializeString): Ditto.
    * html/parser/HTMLEntityParser.cpp:
    (WebCore::HTMLEntityParser::consumeNamedEntity): Ditto.
    * svg/SVGFontData.cpp:
    (WebCore::SVGFontData::createStringWithMirroredCharacters): Ditto.
    * xml/parser/CharacterReferenceParserInlines.h:
    (WebCore::consumeCharacterReference): Ditto.
    * xml/parser/XMLCharacterReferenceParser.cpp: Remove an older helper
    superseded by StringBuilder::append.
    
    Source/WTF:
    
    * wtf/text/StringBuilder.h:
    (WTF::StringBuilder::append): Added a method for appending a UChar32 to a StringBuilder.
    
    Tools:
    
    * TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
    (TestWebKitAPI::TEST): Added a simple test for appending UChar32.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@140731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    902c346e