Abstract the logic for appending a UChar32 onto StringBuilder
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2013 23:01:06 +0000 (23:01 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 24 Jan 2013 23:01:06 +0000 (23:01 +0000)
commitebcccf6fd81d97184830bc2e2aa297a37bb47d2e
tree9f655bd037cfafaa0dee2f2a65cb3a5acbc55f73
parent8bee4aad0bc9ffb7c9304daa749f14266d25eef9
Abstract the logic for appending a UChar32 onto StringBuilder
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: https://svn.webkit.org/repository/webkit/trunk@140731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/text/StringBuilder.h
Source/WebCore/ChangeLog
Source/WebCore/css/CSSOMUtils.cpp
Source/WebCore/html/parser/HTMLEntityParser.cpp
Source/WebCore/svg/SVGFontData.cpp
Source/WebCore/xml/parser/CharacterReferenceParserInlines.h
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp