JSC::StringBuilder operates on a Vector<UChar, 64> and allows to efficiently build a string based on a stream of characters. WebCore::StringBuilder operates on a Vector<String, 16> and allows to concat a set of arbitary Strings, it's not very efficient for single characters, as a String is built for each of them. When evaluating the usages of WebCore::StringBuilder, all clients of this code, use it to combine Strings _and_ single characters (grep -RI StringBuilder * in WebCore). My proposal is to use the JSC::StringBuilder throughout WebCore & JSC, as it's more efficient, and reduces the duplicated code mess. Move it to wtf/text/StringBuilder, add a new UStringBuilder class to JSC/runtime that extends the StringBuilder to support appending/creating UStrings as well. This class can go away, once we've completed unifying WTFString & UString.
Created attachment 70520 [details] Patch
Attachment 70520 [details] did not pass style-queue: Failed to run "['WebKitTools/Scripts/check-webkit-style']" exit_code: 1 WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeWin.cpp:49: Alphabetical sorting problem. [build/include_order] [4] WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp:56: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 2 in 36 files If any of these errors are false positives, please file a bug against check-webkit-style.
The WebCore/ChangeLog is still missing some information, only marked it for review, to get EWS results.
Created attachment 70523 [details] Patch v2 Fixed a regression, now all tests pass as expected, also simplifies Node.h a bit.
Attachment 70520 [details] did not build on chromium: Build output: http://queues.webkit.org/results/4334033
(In reply to comment #5) > Attachment 70520 [details] did not build on chromium: > Build output: http://queues.webkit.org/results/4334033 Fixing...
Created attachment 70524 [details] Patch v3 Chromium is using StringBuilder from WebKit/chromium/src - didn't know that, uploading new patch, which attempts to fix the Chromium build.
Attachment 70524 [details] did not build on chromium: Build output: http://queues.webkit.org/results/4321039
Created attachment 70540 [details] Patch v4 Hopefully chromium builds this time...
Comment on attachment 70540 [details] Patch v4 Looks great.
Committed r69594: <http://trac.webkit.org/changeset/69594>
Landed in r69594.