<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[277437] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/277437">277437</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2021-05-13 09:18:32 -0700 (Thu, 13 May 2021)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove StringBuilder::appendNumber
https://bugs.webkit.org/show_bug.cgi?id=225732

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* API/JSContextRef.cpp:
(BacktraceFunctor::operator() const): Use append instead of appendNumber.
* API/tests/PingPongStackOverflowTest.cpp:
(PingPongStackOverflowObject_hasInstance): Ditto.
* heap/HeapSnapshotBuilder.cpp:
(JSC::HeapSnapshotBuilder::json): Ditto.

* interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::toString const): Use makeString instead of StringBuilder.

* runtime/ConsoleClient.cpp:
(JSC::appendURLAndPosition): Ditto.
(JSC::ConsoleClient::printConsoleMessageWithArguments): Use append instead of appendNumber.
* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue): Ditto.
* runtime/Options.cpp:
(JSC::OptionReader::Option::dump const): Ditto.

* runtime/StackFrame.cpp:
(JSC::StackFrame::toString const): Use makeString instead of StringBuilder.

Source/WebCore:

* Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::loggingString const):
Use append instead of appendNumber.

* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::hostName): Use makeString instead of StringBuilder.

* contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::prefixTreeVertexToString):
Use append instead of appendNumber.
* contentextensions/Term.h:
(WebCore::ContentExtensions::Term::toString const): Ditto.
* css/CSSFontFeatureValue.cpp:
(WebCore::CSSFontFeatureValue::customCSSText const): Ditto.
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSStepsTimingFunctionValue::customCSSText const): Ditto.

* dom/Document.cpp:
(WebCore::Document::downgradeReferrerToRegistrableDomain): Use
makeString instead of StringBuilder.
* editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::generateUniquePrefix): Ditto.

* editing/cocoa/DataDetection.mm:
(WebCore::dataDetectorStringForPath): Use append instead of appendNumber.
* html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition): Ditto.

* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createContext2d): Use makeString
instead of StringBuilder.
(WebCore::HTMLCanvasElement::createImageBuffer const): Ditto.

* loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::toString const): Use append instead
of appendNumber.

* loader/SubresourceIntegrity.cpp:
(WebCore::integrityMismatchDescription): Use makeString instead of
StringBuilder.

* page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::rootMargin const): Use append instead
of appendNumber.

* page/SecurityOriginData.cpp:
(WebCore::SecurityOriginData::databaseIdentifier const): Use makeString
instead of StringBuilder.

* platform/Decimal.cpp:
(WebCore::Decimal::toString const): Use append instead of appendNumber.

* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::animationNameForTransition): Use makeString
instead of StringBuilder.
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::createTileLayer): Ditto.

* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(printTransform): Use single append instead of a run of them.
(printLayer): Ditto, and use append instead of apppendNumber.
(PlatformCALayerWin::layerTreeAsString const): Ditto.

* platform/mediarecorder/MediaRecorderPrivateMock.cpp:
(WebCore::MediaRecorderPrivateMock::generateMockCounterString):
Use append instead of appendNumber.
* platform/network/ProxyServer.cpp:
(WebCore::appendProxyServerString): Ditto.
* rendering/RenderTreeAsText.cpp:
(WebCore::nodePosition): Ditto.
* svg/SVGPathUtilities.cpp:
(WebCore::buildStringFromPath): Ditto.

* testing/Internals.cpp:
(WebCore::Internals::parserMetaData): Use makeString instead of
StringBuilder.
(WebCore::appendOffsets): Use append instead of appendNumber.

* testing/MockPageOverlayClient.cpp:
(WebCore::MockPageOverlayClient::drawRect): Use makeString instead
of StringBuilder.
(WebCore::MockPageOverlayClient::mouseEvent): Ditto.

* xml/XMLErrors.cpp:
(WebCore::XMLErrors::appendErrorMessage): Use append instead of
appendNumber.

Source/WebDriver:

* SessionHost.cpp:
(WebDriver::SessionHost::sendCommandToBackend): Use append instead
of appendNumber.
* socket/HTTPServerSocket.cpp:
(WebDriver::HTTPRequestHandler::packHTTPMessage const): Ditto.

Source/WebKit:

* NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::buildList): Use append instead of appendNumber.
(WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString): Ditto.
* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile): Ditto.
* UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewRunJavaScriptCallback): Ditto.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::loggingString): Ditto.

* WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
(PageResourceLoadClient::didReceiveResponseForResource): Use makeString instead
of StringBuilder.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::buildHTTPHeaders): Use append instead of appendNumber.

Source/WebKitLegacy/win:

* WebKitStatistics.cpp:
(WebKitStatistics::comClassNameCounts): Use append instead of
appendNumber.

Source/WTF:

We originally added StringBuilder::appendNumber to resolve the ambiguity
between UChar and uint16_t, but that problem was solved long ago and it
is safe to use StringBuilder::append, including the variadic form, on all
types of numbers and we'll get the same results we did with appendNumber.

* wtf/JSONValues.cpp:
(WTF::JSONImpl::Value::writeJSON const): Use append instead of appendNumber.

* wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::appendNumber): Deleted.
* wtf/text/StringBuilder.h: Removed appendNumber.

* wtf/text/TextStream.cpp:
(WTF::TextStream::operator<<): Use append instead of appendNumber.

Tools:

* TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
Test append with a number instead of appendNumber.

* TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
Use append instead of appendNumber.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::dumpResponseDescriptionSuitableForTestResult): Use append instead
of appendNumber.
(WTR::dumpFrameScrollPosition): Ditto.
(WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): Use makeString
instead of StringBuilder.
(WTR::InjectedBundlePage::shouldCacheResponse): Ditto.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::attributesOfElement): Use append instead of appendNumber.
(WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
(WTR::stringAtOffset): Ditto.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreAPIJSContextRefcpp">trunk/Source/JavaScriptCore/API/JSContextRef.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreAPItestsPingPongStackOverflowTestcpp">trunk/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapSnapshotBuildercpp">trunk/Source/JavaScriptCore/heap/HeapSnapshotBuilder.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinterpreterStackVisitorcpp">trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeConsoleClientcpp">trunk/Source/JavaScriptCore/runtime/ConsoleClient.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSONObjectcpp">trunk/Source/JavaScriptCore/runtime/JSONObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeOptionscpp">trunk/Source/JavaScriptCore/runtime/Options.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeStackFramecpp">trunk/Source/JavaScriptCore/runtime/StackFrame.cpp</a></li>
<li><a href="#trunkSourceWTFChangeLog">trunk/Source/WTF/ChangeLog</a></li>
<li><a href="#trunkSourceWTFwtfJSONValuescpp">trunk/Source/WTF/wtf/JSONValues.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextStringBuildercpp">trunk/Source/WTF/wtf/text/StringBuilder.cpp</a></li>
<li><a href="#trunkSourceWTFwtftextStringBuilderh">trunk/Source/WTF/wtf/text/StringBuilder.h</a></li>
<li><a href="#trunkSourceWTFwtftextTextStreamcpp">trunk/Source/WTF/wtf/text/TextStream.cpp</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbserverIndexValueStorecpp">trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModuleswebsocketsWebSocketHandshakecpp">trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsCombinedURLFilterscpp">trunk/Source/WebCore/contentextensions/CombinedURLFilters.cpp</a></li>
<li><a href="#trunkSourceWebCorecontentextensionsTermh">trunk/Source/WebCore/contentextensions/Term.h</a></li>
<li><a href="#trunkSourceWebCorecssCSSFontFeatureValuecpp">trunk/Source/WebCore/css/CSSFontFeatureValue.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSTimingFunctionValuecpp">trunk/Source/WebCore/css/CSSTimingFunctionValue.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingMarkupAccumulatorcpp">trunk/Source/WebCore/editing/MarkupAccumulator.cpp</a></li>
<li><a href="#trunkSourceWebCoreeditingcocoaDataDetectionmm">trunk/Source/WebCore/editing/cocoa/DataDetection.mm</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLAnchorElementcpp">trunk/Source/WebCore/html/HTMLAnchorElement.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementcpp">trunk/Source/WebCore/html/HTMLCanvasElement.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderResourceLoadStatisticscpp">trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp</a></li>
<li><a href="#trunkSourceWebCoreloaderSubresourceIntegritycpp">trunk/Source/WebCore/loader/SubresourceIntegrity.cpp</a></li>
<li><a href="#trunkSourceWebCorepageIntersectionObservercpp">trunk/Source/WebCore/page/IntersectionObserver.cpp</a></li>
<li><a href="#trunkSourceWebCorepageSecurityOriginDatacpp">trunk/Source/WebCore/page/SecurityOriginData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformDecimalcpp">trunk/Source/WebCore/platform/Decimal.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayercpp">trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaTileControllercpp">trunk/Source/WebCore/platform/graphics/ca/TileController.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscawinPlatformCALayerWincpp">trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformmediarecorderMediaRecorderPrivateMockcpp">trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkProxyServercpp">trunk/Source/WebCore/platform/network/ProxyServer.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTreeAsTextcpp">trunk/Source/WebCore/rendering/RenderTreeAsText.cpp</a></li>
<li><a href="#trunkSourceWebCoresvgSVGPathUtilitiescpp">trunk/Source/WebCore/svg/SVGPathUtilities.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingMockPageOverlayClientcpp">trunk/Source/WebCore/testing/MockPageOverlayClient.cpp</a></li>
<li><a href="#trunkSourceWebCorexmlXMLErrorscpp">trunk/Source/WebCore/xml/XMLErrors.cpp</a></li>
<li><a href="#trunkSourceWebDriverChangeLog">trunk/Source/WebDriver/ChangeLog</a></li>
<li><a href="#trunkSourceWebDriverSessionHostcpp">trunk/Source/WebDriver/SessionHost.cpp</a></li>
<li><a href="#trunkSourceWebDriversocketHTTPServerSocketcpp">trunk/Source/WebDriver/socket/HTTPServerSocket.cpp</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitNetworkProcessClassifierResourceLoadStatisticsDatabaseStorecpp">trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp</a></li>
<li><a href="#trunkSourceWebKitSharedWebMemorySamplercpp">trunk/Source/WebKit/Shared/WebMemorySampler.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessAPIglibWebKitWebViewcpp">trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp</a></li>
<li><a href="#trunkSourceWebKitUIProcessWebBackForwardListcpp">trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessInjectedBundleAPIglibWebKitWebPagecpp">trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp</a></li>
<li><a href="#trunkSourceWebKitWebProcessPluginsPluginViewcpp">trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp</a></li>
<li><a href="#trunkSourceWebKitLegacywinChangeLog">trunk/Source/WebKitLegacy/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitLegacywinWebKitStatisticscpp">trunk/Source/WebKitLegacy/win/WebKitStatistics.cpp</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWTFStringBuildercpp">trunk/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp</a></li>
<li><a href="#trunkToolsTestWebKitAPITestsWebKitGLibTestAutomationSessioncpp">trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlePagecpp">trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp">trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreAPIJSContextRefcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSContextRef.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSContextRef.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/API/JSContextRef.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -290,18 +290,12 @@
</span><span class="cx">             StringBuilder& builder = m_builder;
</span><span class="cx">             if (!builder.isEmpty())
</span><span class="cx">                 builder.append('\n');
</span><del>-            builder.append('#');
-            builder.appendNumber(visitor->index());
-            builder.append(' ');
-            builder.append(visitor->functionName());
-            builder.appendLiteral("() at ");
-            builder.append(visitor->sourceURL());
</del><ins>+            builder.append('#', visitor->index(), ' ', visitor->functionName(), "() at ", visitor->sourceURL());
</ins><span class="cx">             if (visitor->hasLineAndColumnInfo()) {
</span><del>-                builder.append(':');
</del><span class="cx">                 unsigned lineNumber;
</span><span class="cx">                 unsigned unusedColumn;
</span><span class="cx">                 visitor->computeLineAndColumn(lineNumber, unusedColumn);
</span><del>-                builder.appendNumber(lineNumber);
</del><ins>+                builder.append(':', lineNumber);
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             if (!visitor->callee().rawPtr())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreAPItestsPingPongStackOverflowTestcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp      2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/API/tests/PingPongStackOverflowTest.cpp 2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -56,13 +56,9 @@
</span><span class="cx">     } else {
</span><span class="cx">         StringBuilder builder;
</span><span class="cx">         builder.appendLiteral("dummy.valueOf([0]");
</span><del>-        for (int i = 1; i < 35000; i++) {
-            builder.appendLiteral(", [");
-            builder.appendNumber(i);
-            builder.appendLiteral("]");
-        }
</del><ins>+        for (int i = 1; i < 35000; i++)
+            builder.append(", [", i, ']');
</ins><span class="cx">         builder.appendLiteral(");");
</span><del>-
</del><span class="cx">         JSStringRef script = JSStringCreateWithUTF8CString(builder.toString().utf8().data());
</span><span class="cx">         result = JSEvaluateScript(context, script, nullptr, nullptr, 1, exception);
</span><span class="cx">         JSStringRelease(script);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/ChangeLog       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1,3 +1,31 @@
</span><ins>+2021-05-13  Darin Adler  <darin@apple.com>
+
+        Remove StringBuilder::appendNumber
+        https://bugs.webkit.org/show_bug.cgi?id=225732
+
+        Reviewed by Sam Weinig.
+
+        * API/JSContextRef.cpp:
+        (BacktraceFunctor::operator() const): Use append instead of appendNumber.
+        * API/tests/PingPongStackOverflowTest.cpp:
+        (PingPongStackOverflowObject_hasInstance): Ditto.
+        * heap/HeapSnapshotBuilder.cpp:
+        (JSC::HeapSnapshotBuilder::json): Ditto.
+
+        * interpreter/StackVisitor.cpp:
+        (JSC::StackVisitor::Frame::toString const): Use makeString instead of StringBuilder.
+
+        * runtime/ConsoleClient.cpp:
+        (JSC::appendURLAndPosition): Ditto.
+        (JSC::ConsoleClient::printConsoleMessageWithArguments): Use append instead of appendNumber.
+        * runtime/JSONObject.cpp:
+        (JSC::Stringifier::appendStringifiedValue): Ditto.
+        * runtime/Options.cpp:
+        (JSC::OptionReader::Option::dump const): Ditto.
+
+        * runtime/StackFrame.cpp:
+        (JSC::StackFrame::toString const): Use makeString instead of StringBuilder.
+
</ins><span class="cx"> 2021-05-12  Geoffrey Garen  <ggaren@apple.com>
</span><span class="cx"> 
</span><span class="cx">         ConservativeRoots triggers page demand on Speedometer
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapSnapshotBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapSnapshotBuilder.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapSnapshotBuilder.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/heap/HeapSnapshotBuilder.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -420,24 +420,10 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        // <nodeId>, <sizeInBytes>, <nodeClassNameIndex>, <flags>, [<labelIndex>, <cellEddress>, <wrappedAddress>]
-        json.append(',');
-        json.appendNumber(node.identifier);
-        json.append(',');
-        json.appendNumber(node.cell->estimatedSizeInBytes(vm));
-        json.append(',');
-        json.appendNumber(classNameIndex);
-        json.append(',');
-        json.appendNumber(flags);
-        if (m_snapshotType == SnapshotType::GCDebuggingSnapshot) {
-            json.append(',');
-            json.appendNumber(labelIndex);
-            json.appendLiteral(",\"0x");
-            json.append(hex(reinterpret_cast<uintptr_t>(node.cell), Lowercase));
-            json.appendLiteral("\",\"0x");
-            json.append(hex(reinterpret_cast<uintptr_t>(wrappedAddress), Lowercase));
-            json.append('"');
-        }
</del><ins>+        // <nodeId>, <sizeInBytes>, <nodeClassNameIndex>, <flags>, [<labelIndex>, <cellAddress>, <wrappedAddress>]
+        json.append(',', node.identifier, ',', node.cell->estimatedSizeInBytes(vm), ',', classNameIndex, ',', flags);
+        if (m_snapshotType == SnapshotType::GCDebuggingSnapshot)
+            json.append(',', labelIndex, ",\"0x", hex(reinterpret_cast<uintptr_t>(node.cell), Lowercase), "\",\"0x", hex(reinterpret_cast<uintptr_t>(wrappedAddress), Lowercase), '"');
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     bool firstEdge = true;
</span><span class="lines">@@ -447,12 +433,7 @@
</span><span class="cx">         firstEdge = false;
</span><span class="cx"> 
</span><span class="cx">         // <fromNodeId>, <toNodeId>, <edgeTypeIndex>, <edgeExtraData>
</span><del>-        json.appendNumber(edge.from.identifier);
-        json.append(',');
-        json.appendNumber(edge.to.identifier);
-        json.append(',');
-        json.appendNumber(edgeTypeToNumber(edge.type));
-        json.append(',');
</del><ins>+        json.append(edge.from.identifier, ',', edge.to.identifier, ',', edgeTypeToNumber(edge.type), ',');
</ins><span class="cx">         switch (edge.type) {
</span><span class="cx">         case EdgeType::Property:
</span><span class="cx">         case EdgeType::Variable: {
</span><span class="lines">@@ -460,11 +441,11 @@
</span><span class="cx">             if (result.isNewEntry)
</span><span class="cx">                 nextEdgeNameIndex++;
</span><span class="cx">             unsigned edgeNameIndex = result.iterator->value;
</span><del>-            json.appendNumber(edgeNameIndex);
</del><ins>+            json.append(edgeNameIndex);
</ins><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case EdgeType::Index:
</span><del>-            json.appendNumber(edge.u.index);
</del><ins>+            json.append(edge.u.index);
</ins><span class="cx">             break;
</span><span class="cx">         default:
</span><span class="cx">             // No data for this edge type.
</span><span class="lines">@@ -473,20 +454,15 @@
</span><span class="cx">         }
</span><span class="cx">     };
</span><span class="cx"> 
</span><del>-    json.append('{');
-
</del><span class="cx">     // version
</span><del>-    json.appendLiteral("\"version\":2");
</del><ins>+    json.appendLiteral("{\"version\":2");
</ins><span class="cx"> 
</span><span class="cx">     // type
</span><del>-    json.append(',');
-    json.appendLiteral("\"type\":");
</del><ins>+    json.appendLiteral(",\"type\":");
</ins><span class="cx">     json.appendQuotedJSONString(snapshotTypeToString(m_snapshotType));
</span><span class="cx"> 
</span><span class="cx">     // nodes
</span><del>-    json.append(',');
-    json.appendLiteral("\"nodes\":");
-    json.append('[');
</del><ins>+    json.appendLiteral(",\"nodes\":[");
</ins><span class="cx">     // <root>
</span><span class="cx">     if (m_snapshotType == SnapshotType::GCDebuggingSnapshot)
</span><span class="cx">         json.appendLiteral("0,0,0,0,0,\"0x0\",\"0x0\"");
</span><span class="lines">@@ -500,9 +476,7 @@
</span><span class="cx">     json.append(']');
</span><span class="cx"> 
</span><span class="cx">     // node class names
</span><del>-    json.append(',');
-    json.appendLiteral("\"nodeClassNames\":");
-    json.append('[');
</del><ins>+    json.appendLiteral(",\"nodeClassNames\":[");
</ins><span class="cx">     Vector<String> orderedClassNames(classNameIndexes.size());
</span><span class="cx">     for (auto& entry : classNameIndexes)
</span><span class="cx">         orderedClassNames[entry.value] = entry.key;
</span><span class="lines">@@ -558,17 +532,13 @@
</span><span class="cx">     });
</span><span class="cx"> 
</span><span class="cx">     // edges
</span><del>-    json.append(',');
-    json.appendLiteral("\"edges\":");
-    json.append('[');
</del><ins>+    json.appendLiteral(",\"edges\":[");
</ins><span class="cx">     for (auto& edge : m_edges)
</span><span class="cx">         appendEdgeJSON(edge);
</span><span class="cx">     json.append(']');
</span><span class="cx"> 
</span><span class="cx">     // edge types
</span><del>-    json.append(',');
-    json.appendLiteral("\"edgeTypes\":");
-    json.append('[');
</del><ins>+    json.appendLiteral(",\"edgeTypes\":['");
</ins><span class="cx">     json.appendQuotedJSONString(edgeTypeToString(EdgeType::Internal));
</span><span class="cx">     json.append(',');
</span><span class="cx">     json.appendQuotedJSONString(edgeTypeToString(EdgeType::Property));
</span><span class="lines">@@ -579,9 +549,7 @@
</span><span class="cx">     json.append(']');
</span><span class="cx"> 
</span><span class="cx">     // edge names
</span><del>-    json.append(',');
-    json.appendLiteral("\"edgeNames\":");
-    json.append('[');
</del><ins>+    json.appendLiteral(",\"edgeNames\":[");
</ins><span class="cx">     Vector<UniquedStringImpl*> orderedEdgeNames(edgeNameIndexes.size());
</span><span class="cx">     for (auto& entry : edgeNameIndexes)
</span><span class="cx">         orderedEdgeNames[entry.value] = entry.key;
</span><span class="lines">@@ -597,9 +565,7 @@
</span><span class="cx">     json.append(']');
</span><span class="cx"> 
</span><span class="cx">     if (m_snapshotType == SnapshotType::GCDebuggingSnapshot) {
</span><del>-        json.append(',');
-        json.appendLiteral("\"roots\":");
-        json.append('[');
</del><ins>+        json.appendLiteral(",\"roots\":[");
</ins><span class="cx"> 
</span><span class="cx">         HeapSnapshot* snapshot = m_profiler.mostRecentSnapshot();
</span><span class="cx"> 
</span><span class="lines">@@ -615,7 +581,7 @@
</span><span class="cx">                 json.append(',');
</span><span class="cx"> 
</span><span class="cx">             firstNode = false;
</span><del>-            json.appendNumber(snapshotNode.value().identifier);
</del><ins>+            json.append(snapshotNode.value().identifier);
</ins><span class="cx"> 
</span><span class="cx">             // Maybe we should just always encode the root names.
</span><span class="cx">             const char* rootName = rootMarkReasonDescription(it.value.markReason);
</span><span class="lines">@@ -622,9 +588,7 @@
</span><span class="cx">             auto result = labelIndexes.add(rootName, nextLabelIndex);
</span><span class="cx">             if (result.isNewEntry)
</span><span class="cx">                 nextLabelIndex++;
</span><del>-            unsigned labelIndex = result.iterator->value;
-            json.append(',');
-            json.appendNumber(labelIndex);
</del><ins>+            json.append(',', result.iterator->value);
</ins><span class="cx"> 
</span><span class="cx">             unsigned reachabilityReasonIndex = 0;
</span><span class="cx">             if (it.value.reachabilityFromOpaqueRootReasons) {
</span><span class="lines">@@ -633,8 +597,7 @@
</span><span class="cx">                     nextLabelIndex++;
</span><span class="cx">                 reachabilityReasonIndex = result.iterator->value;
</span><span class="cx">             }
</span><del>-            json.append(',');
-            json.appendNumber(reachabilityReasonIndex);
</del><ins>+            json.append(',', reachabilityReasonIndex);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         json.append(']');
</span><span class="lines">@@ -642,9 +605,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (m_snapshotType == SnapshotType::GCDebuggingSnapshot) {
</span><span class="cx">         // internal node descriptions
</span><del>-        json.append(',');
-        json.appendLiteral("\"labels\":");
-        json.append('[');
</del><ins>+        json.appendLiteral(",\"labels\":[");
</ins><span class="cx"> 
</span><span class="cx">         Vector<String> orderedLabels(labelIndexes.size());
</span><span class="cx">         for (auto& entry : labelIndexes)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinterpreterStackVisitorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> #include "WasmCallee.h"
</span><span class="cx"> #include "WasmIndexOrName.h"
</span><span class="cx"> #include "WebAssemblyFunction.h"
</span><del>-#include <wtf/text/StringBuilder.h>
</del><ins>+#include <wtf/text/StringConcatenateNumbers.h>
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="lines">@@ -338,25 +338,17 @@
</span><span class="cx"> 
</span><span class="cx"> String StackVisitor::Frame::toString() const
</span><span class="cx"> {
</span><del>-    StringBuilder traceBuild;
</del><span class="cx">     String functionName = this->functionName();
</span><span class="cx">     String sourceURL = this->sourceURL();
</span><del>-    traceBuild.append(functionName);
-    if (!sourceURL.isEmpty()) {
-        if (!functionName.isEmpty())
-            traceBuild.append('@');
-        traceBuild.append(sourceURL);
-        if (hasLineAndColumnInfo()) {
-            unsigned line = 0;
-            unsigned column = 0;
-            computeLineAndColumn(line, column);
-            traceBuild.append(':');
-            traceBuild.appendNumber(line);
-            traceBuild.append(':');
-            traceBuild.appendNumber(column);
-        }
-    }
-    return traceBuild.toString().impl();
</del><ins>+    const char* separator = !sourceURL.isEmpty() && !functionName.isEmpty() ? "@" : "";
+
+    if (sourceURL.isEmpty() || !hasLineAndColumnInfo())
+        return makeString(functionName, separator, sourceURL);
+
+    unsigned line = 0;
+    unsigned column = 0;
+    computeLineAndColumn(line, column);
+    return makeString(functionName, separator, sourceURL, ':', line, ':', column);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> intptr_t StackVisitor::Frame::sourceID()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeConsoleClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/ConsoleClient.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/ConsoleClient.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/runtime/ConsoleClient.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -48,15 +48,11 @@
</span><span class="cx"> 
</span><span class="cx">     builder.append(url);
</span><span class="cx"> 
</span><del>-    if (lineNumber > 0) {
-        builder.append(':');
-        builder.appendNumber(lineNumber);
-    }
</del><ins>+    if (lineNumber > 0)
+        builder.append(':', lineNumber);
</ins><span class="cx"> 
</span><del>-    if (columnNumber > 0) {
-        builder.append(':');
-        builder.appendNumber(columnNumber);
-    }
</del><ins>+    if (columnNumber > 0)
+        builder.append(':', columnNumber);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void appendMessagePrefix(StringBuilder& builder, MessageSource source, MessageType type, MessageLevel level)
</span><span class="lines">@@ -236,15 +232,12 @@
</span><span class="cx">     if (isTraceMessage) {
</span><span class="cx">         for (size_t i = 0; i < callStack->size(); ++i) {
</span><span class="cx">             const ScriptCallFrame& callFrame = callStack->at(i);
</span><del>-            String functionName = String(callFrame.functionName());
</del><ins>+            String functionName = callFrame.functionName();
</ins><span class="cx">             if (functionName.isEmpty())
</span><span class="cx">                 functionName = "(unknown)"_s;
</span><span class="cx"> 
</span><span class="cx">             StringBuilder callFrameBuilder;
</span><del>-            callFrameBuilder.appendNumber(i);
-            callFrameBuilder.appendLiteral(": ");
-            callFrameBuilder.append(functionName);
-            callFrameBuilder.append('(');
</del><ins>+            callFrameBuilder.append(i, ": ", functionName, '(');
</ins><span class="cx">             appendURLAndPosition(callFrameBuilder, callFrame.sourceURL(), callFrame.lineNumber(), callFrame.columnNumber());
</span><span class="cx">             callFrameBuilder.append(')');
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSONObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSONObject.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSONObject.cpp       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/runtime/JSONObject.cpp  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -363,13 +363,13 @@
</span><span class="cx"> 
</span><span class="cx">     if (value.isNumber()) {
</span><span class="cx">         if (value.isInt32())
</span><del>-            builder.appendNumber(value.asInt32());
</del><ins>+            builder.append(value.asInt32());
</ins><span class="cx">         else {
</span><span class="cx">             double number = value.asNumber();
</span><span class="cx">             if (!std::isfinite(number))
</span><span class="cx">                 builder.appendLiteral("null");
</span><span class="cx">             else
</span><del>-                builder.appendNumber(number);
</del><ins>+                builder.append(number);
</ins><span class="cx">         }
</span><span class="cx">         return StringifySucceeded;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeOptionscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/Options.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/Options.cpp  2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/runtime/Options.cpp     2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1084,34 +1084,27 @@
</span><span class="cx">         builder.append(m_bool ? "true" : "false");
</span><span class="cx">         break;
</span><span class="cx">     case Options::Type::Unsigned:
</span><del>-        builder.appendNumber(m_unsigned);
</del><ins>+        builder.append(m_unsigned);
</ins><span class="cx">         break;
</span><span class="cx">     case Options::Type::Size:
</span><del>-        builder.appendNumber(m_size);
</del><ins>+        builder.append(m_size);
</ins><span class="cx">         break;
</span><span class="cx">     case Options::Type::Double:
</span><span class="cx">         builder.append(m_double);
</span><span class="cx">         break;
</span><span class="cx">     case Options::Type::Int32:
</span><del>-        builder.appendNumber(m_int32);
</del><ins>+        builder.append(m_int32);
</ins><span class="cx">         break;
</span><span class="cx">     case Options::Type::OptionRange:
</span><span class="cx">         builder.append(m_optionRange.rangeString());
</span><span class="cx">         break;
</span><del>-    case Options::Type::OptionString: {
-        const char* option = m_optionString;
-        if (!option)
-            option = "";
-        builder.append('"');
-        builder.append(option);
-        builder.append('"');
</del><ins>+    case Options::Type::OptionString:
+        builder.append('"', m_optionString ? m_optionString : "", '"');
</ins><span class="cx">         break;
</span><del>-    }
-    case Options::Type::GCLogLevel: {
</del><ins>+    case Options::Type::GCLogLevel:
</ins><span class="cx">         builder.append(GCLogging::levelAsString(m_gcLogLevel));
</span><span class="cx">         break;
</span><span class="cx">     }
</span><del>-    }
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool OptionReader::Option::operator==(const Option& other) const
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeStackFramecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/StackFrame.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/StackFrame.cpp       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/JavaScriptCore/runtime/StackFrame.cpp  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -29,7 +29,7 @@
</span><span class="cx"> #include "CodeBlock.h"
</span><span class="cx"> #include "DebuggerPrimitives.h"
</span><span class="cx"> #include "JSCellInlines.h"
</span><del>-#include <wtf/text/StringBuilder.h>
</del><ins>+#include <wtf/text/StringConcatenateNumbers.h>
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><span class="lines">@@ -120,26 +120,16 @@
</span><span class="cx"> 
</span><span class="cx"> String StackFrame::toString(VM& vm) const
</span><span class="cx"> {
</span><del>-    StringBuilder traceBuild;
</del><span class="cx">     String functionName = this->functionName(vm);
</span><span class="cx">     String sourceURL = this->sourceURL();
</span><del>-    traceBuild.append(functionName);
-    traceBuild.append('@');
-    if (!sourceURL.isEmpty()) {
-        traceBuild.append(sourceURL);
-        if (hasLineAndColumnInfo()) {
-            unsigned line;
-            unsigned column;
-            computeLineAndColumn(line, column);
</del><span class="cx"> 
</span><del>-            traceBuild.append(':');
-            traceBuild.appendNumber(line);
-            traceBuild.append(':');
-            traceBuild.appendNumber(column);
-        }
-    }
-    return traceBuild.toString().impl();
</del><ins>+    if (sourceURL.isEmpty() || !hasLineAndColumnInfo())
+        return makeString(functionName, '@', sourceURL);
+
+    unsigned line;
+    unsigned column;
+    computeLineAndColumn(line, column);
+    return makeString(functionName, '@', sourceURL, ':', line, ':', column);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span><del>-
</del></span></pre></div>
<a id="trunkSourceWTFChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/ChangeLog (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/ChangeLog       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WTF/ChangeLog  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2021-05-13  Darin Adler  <darin@apple.com>
+
+        Remove StringBuilder::appendNumber
+        https://bugs.webkit.org/show_bug.cgi?id=225732
+
+        Reviewed by Sam Weinig.
+
+        We originally added StringBuilder::appendNumber to resolve the ambiguity
+        between UChar and uint16_t, but that problem was solved long ago and it
+        is safe to use StringBuilder::append, including the variadic form, on all
+        types of numbers and we'll get the same results we did with appendNumber.
+
+        * wtf/JSONValues.cpp:
+        (WTF::JSONImpl::Value::writeJSON const): Use append instead of appendNumber.
+
+        * wtf/text/StringBuilder.cpp:
+        (WTF::StringBuilder::appendNumber): Deleted.
+        * wtf/text/StringBuilder.h: Removed appendNumber.
+
+        * wtf/text/TextStream.cpp:
+        (WTF::TextStream::operator<<): Use append instead of appendNumber.
+
</ins><span class="cx"> 2021-05-12  Mark Lam  <mark.lam@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Implement some common Baseline JIT slow paths using JIT thunks.
</span></span></pre></div>
<a id="trunkSourceWTFwtfJSONValuescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/JSONValues.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/JSONValues.cpp      2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WTF/wtf/JSONValues.cpp 2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -614,7 +614,7 @@
</span><span class="cx">         if (!std::isfinite(m_value.number))
</span><span class="cx">             output.appendLiteral("null");
</span><span class="cx">         else
</span><del>-            output.appendNumber(m_value.number);
</del><ins>+            output.append(m_value.number);
</ins><span class="cx">         break;
</span><span class="cx">     }
</span><span class="cx">     default:
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringBuilder.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringBuilder.cpp      2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WTF/wtf/text/StringBuilder.cpp 2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -393,48 +393,6 @@
</span><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-void StringBuilder::appendNumber(int number)
-{
-    numberToStringSigned<StringBuilder>(number, this);
-}
-
-void StringBuilder::appendNumber(unsigned number)
-{
-    numberToStringUnsigned<StringBuilder>(number, this);
-}
-
-void StringBuilder::appendNumber(long number)
-{
-    numberToStringSigned<StringBuilder>(number, this);
-}
-
-void StringBuilder::appendNumber(unsigned long number)
-{
-    numberToStringUnsigned<StringBuilder>(number, this);
-}
-
-void StringBuilder::appendNumber(long long number)
-{
-    numberToStringSigned<StringBuilder>(number, this);
-}
-
-void StringBuilder::appendNumber(unsigned long long number)
-{
-    numberToStringUnsigned<StringBuilder>(number, this);
-}
-
-void StringBuilder::appendNumber(float number)
-{
-    NumberToStringBuffer buffer;
-    append(numberToString(number, buffer));
-}
-
-void StringBuilder::appendNumber(double number)
-{
-    NumberToStringBuffer buffer;
-    append(numberToString(number, buffer));
-}
-
</del><span class="cx"> bool StringBuilder::canShrink() const
</span><span class="cx"> {
</span><span class="cx">     if (hasOverflowed())
</span></span></pre></div>
<a id="trunkSourceWTFwtftextStringBuilderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/StringBuilder.h (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/StringBuilder.h        2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WTF/wtf/text/StringBuilder.h   2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -219,15 +219,6 @@
</span><span class="cx">     template<unsigned characterCount>
</span><span class="cx">     ALWAYS_INLINE void appendLiteral(const char (&characters)[characterCount]) { appendCharacters(characters, characterCount - 1); }
</span><span class="cx"> 
</span><del>-    WTF_EXPORT_PRIVATE void appendNumber(int);
-    WTF_EXPORT_PRIVATE void appendNumber(unsigned);
-    WTF_EXPORT_PRIVATE void appendNumber(long);
-    WTF_EXPORT_PRIVATE void appendNumber(unsigned long);
-    WTF_EXPORT_PRIVATE void appendNumber(long long);
-    WTF_EXPORT_PRIVATE void appendNumber(unsigned long long);
-    WTF_EXPORT_PRIVATE void appendNumber(float);
-    WTF_EXPORT_PRIVATE void appendNumber(double);
-
</del><span class="cx">     template<typename... StringTypes> void append(StringTypes...);
</span><span class="cx"> 
</span><span class="cx">     String toString()
</span></span></pre></div>
<a id="trunkSourceWTFwtftextTextStreamcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WTF/wtf/text/TextStream.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WTF/wtf/text/TextStream.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WTF/wtf/text/TextStream.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -53,37 +53,37 @@
</span><span class="cx"> 
</span><span class="cx"> TextStream& TextStream::operator<<(int i)
</span><span class="cx"> {
</span><del>-    m_text.appendNumber(i);
</del><ins>+    m_text.append(i);
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& TextStream::operator<<(unsigned i)
</span><span class="cx"> {
</span><del>-    m_text.appendNumber(i);
</del><ins>+    m_text.append(i);
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& TextStream::operator<<(long i)
</span><span class="cx"> {
</span><del>-    m_text.appendNumber(i);
</del><ins>+    m_text.append(i);
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& TextStream::operator<<(unsigned long i)
</span><span class="cx"> {
</span><del>-    m_text.appendNumber(i);
</del><ins>+    m_text.append(i);
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& TextStream::operator<<(long long i)
</span><span class="cx"> {
</span><del>-    m_text.appendNumber(i);
</del><ins>+    m_text.append(i);
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> TextStream& TextStream::operator<<(unsigned long long i)
</span><span class="cx"> {
</span><del>-    m_text.appendNumber(i);
</del><ins>+    m_text.append(i);
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -131,7 +131,7 @@
</span><span class="cx">         return *this;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    m_text.appendNumber(static_cast<int>(numberToFormat.value));
</del><ins>+    m_text.append(static_cast<int>(numberToFormat.value));
</ins><span class="cx">     return *this;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog   2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/ChangeLog      2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1,3 +1,97 @@
</span><ins>+2021-05-13  Darin Adler  <darin@apple.com>
+
+        Remove StringBuilder::appendNumber
+        https://bugs.webkit.org/show_bug.cgi?id=225732
+
+        Reviewed by Sam Weinig.
+
+        * Modules/indexeddb/server/IndexValueStore.cpp:
+        (WebCore::IDBServer::IndexValueStore::loggingString const):
+        Use append instead of appendNumber.
+
+        * Modules/websockets/WebSocketHandshake.cpp:
+        (WebCore::hostName): Use makeString instead of StringBuilder.
+
+        * contentextensions/CombinedURLFilters.cpp:
+        (WebCore::ContentExtensions::prefixTreeVertexToString):
+        Use append instead of appendNumber.
+        * contentextensions/Term.h:
+        (WebCore::ContentExtensions::Term::toString const): Ditto.
+        * css/CSSFontFeatureValue.cpp:
+        (WebCore::CSSFontFeatureValue::customCSSText const): Ditto.
+        * css/CSSTimingFunctionValue.cpp:
+        (WebCore::CSSStepsTimingFunctionValue::customCSSText const): Ditto.
+
+        * dom/Document.cpp:
+        (WebCore::Document::downgradeReferrerToRegistrableDomain): Use
+        makeString instead of StringBuilder.
+        * editing/MarkupAccumulator.cpp:
+        (WebCore::MarkupAccumulator::generateUniquePrefix): Ditto.
+
+        * editing/cocoa/DataDetection.mm:
+        (WebCore::dataDetectorStringForPath): Use append instead of appendNumber.
+        * html/HTMLAnchorElement.cpp:
+        (WebCore::appendServerMapMousePosition): Ditto.
+
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::createContext2d): Use makeString
+        instead of StringBuilder.
+        (WebCore::HTMLCanvasElement::createImageBuffer const): Ditto.
+
+        * loader/ResourceLoadStatistics.cpp:
+        (WebCore::ResourceLoadStatistics::toString const): Use append instead
+        of appendNumber.
+
+        * loader/SubresourceIntegrity.cpp:
+        (WebCore::integrityMismatchDescription): Use makeString instead of
+        StringBuilder.
+
+        * page/IntersectionObserver.cpp:
+        (WebCore::IntersectionObserver::rootMargin const): Use append instead
+        of appendNumber.
+
+        * page/SecurityOriginData.cpp:
+        (WebCore::SecurityOriginData::databaseIdentifier const): Use makeString
+        instead of StringBuilder.
+
+        * platform/Decimal.cpp:
+        (WebCore::Decimal::toString const): Use append instead of appendNumber.
+
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::animationNameForTransition): Use makeString
+        instead of StringBuilder.
+        * platform/graphics/ca/TileController.cpp:
+        (WebCore::TileController::createTileLayer): Ditto.
+
+        * platform/graphics/ca/win/PlatformCALayerWin.cpp:
+        (printTransform): Use single append instead of a run of them.
+        (printLayer): Ditto, and use append instead of apppendNumber.
+        (PlatformCALayerWin::layerTreeAsString const): Ditto.
+
+        * platform/mediarecorder/MediaRecorderPrivateMock.cpp:
+        (WebCore::MediaRecorderPrivateMock::generateMockCounterString):
+        Use append instead of appendNumber.
+        * platform/network/ProxyServer.cpp:
+        (WebCore::appendProxyServerString): Ditto.
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::nodePosition): Ditto.
+        * svg/SVGPathUtilities.cpp:
+        (WebCore::buildStringFromPath): Ditto.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::parserMetaData): Use makeString instead of
+        StringBuilder.
+        (WebCore::appendOffsets): Use append instead of appendNumber.
+
+        * testing/MockPageOverlayClient.cpp:
+        (WebCore::MockPageOverlayClient::drawRect): Use makeString instead
+        of StringBuilder.
+        (WebCore::MockPageOverlayClient::mouseEvent): Ditto.
+
+        * xml/XMLErrors.cpp:
+        (WebCore::XMLErrors::appendErrorMessage): Use append instead of
+        appendNumber.
+
</ins><span class="cx"> 2021-05-13  Zalan Bujtas  <zalan@apple.com>
</span><span class="cx"> 
</span><span class="cx">         [css-flexbox] Flex item construction may affect sibling flex item height computation
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbserverIndexValueStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp        2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/Modules/indexeddb/server/IndexValueStore.cpp   2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -400,13 +400,8 @@
</span><span class="cx"> String IndexValueStore::loggingString() const
</span><span class="cx"> {
</span><span class="cx">     StringBuilder builder;
</span><del>-    for (auto& key : m_orderedKeys) {
-        builder.appendLiteral("Key: ");
-        builder.append(key.loggingString());
-        builder.appendLiteral("  Entry has ");
-        builder.appendNumber(m_records.get(key)->getCount());
-        builder.appendLiteral(" entries");
-    }
</del><ins>+    for (auto& key : m_orderedKeys)
+        builder.append("Key: ", key.loggingString(), "  Entry has ", m_records.get(key)->getCount(), " entries");
</ins><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreModuleswebsocketsWebSocketHandshakecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp   2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp      2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -78,13 +78,10 @@
</span><span class="cx"> static String hostName(const URL& url, bool secure)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(url.protocolIs("wss") == secure);
</span><del>-    StringBuilder builder;
-    builder.append(url.host().convertToASCIILowercase());
-    if (url.port() && ((!secure && url.port().value() != 80) || (secure && url.port().value() != 443))) {
-        builder.append(':');
-        builder.appendNumber(url.port().value());
-    }
-    return builder.toString();
</del><ins>+    String host = url.host().convertToASCIILowercase();
+    if (url.port() && ((!secure && url.port().value() != 80) || (secure && url.port().value() != 443)))
+        return makeString(host, ':', url.port().value());
+    return host;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static const size_t maxInputSampleSize = 128;
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsCombinedURLFilterscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/CombinedURLFilters.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/CombinedURLFilters.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/contentextensions/CombinedURLFilters.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -103,10 +103,8 @@
</span><span class="cx"> 
</span><span class="cx">     auto actionsSlot = actions.find(&vertex);
</span><span class="cx">     if (actionsSlot != actions.end()) {
</span><del>-        for (uint64_t action : actionsSlot->value) {
-            builder.appendNumber(action);
-            builder.append(',');
-        }
</del><ins>+        for (uint64_t action : actionsSlot->value)
+            builder.append(action, ',');
</ins><span class="cx">     }
</span><span class="cx">     builder.append('\n');
</span><span class="cx">     return builder.toString();
</span></span></pre></div>
<a id="trunkSourceWebCorecontentextensionsTermh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/contentextensions/Term.h (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/contentextensions/Term.h    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/contentextensions/Term.h       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -237,11 +237,8 @@
</span><span class="cx">             if (m_atomData.characterSet.get(c)) {
</span><span class="cx">                 if (isASCIIPrintable(c) && !isASCIISpace(c))
</span><span class="cx">                     builder.append(c);
</span><del>-                else {
-                    builder.append('\\');
-                    builder.append('u');
-                    builder.appendNumber(c);
-                }
</del><ins>+                else
+                    builder.append("\\u", c);
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">         builder.append(']');
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSFontFeatureValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSFontFeatureValue.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSFontFeatureValue.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/css/CSSFontFeatureValue.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -46,10 +46,8 @@
</span><span class="cx">         builder.append(c);
</span><span class="cx">     builder.append('"');
</span><span class="cx">     // Omit the value if it's 1 as 1 is implied by default.
</span><del>-    if (m_value != 1) {
-        builder.append(' ');
-        builder.appendNumber(m_value);
-    }
</del><ins>+    if (m_value != 1)
+        builder.append(' ', m_value);
</ins><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSTimingFunctionValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSTimingFunctionValue.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSTimingFunctionValue.cpp      2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/css/CSSTimingFunctionValue.cpp 2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -43,8 +43,7 @@
</span><span class="cx"> String CSSStepsTimingFunctionValue::customCSSText() const
</span><span class="cx"> {
</span><span class="cx">     StringBuilder builder;
</span><del>-    builder.appendLiteral("steps(");
-    builder.appendNumber(m_steps);
</del><ins>+    builder.append("steps(", m_steps);
</ins><span class="cx">     if (m_stepPosition) {
</span><span class="cx">         switch (m_stepPosition.value()) {
</span><span class="cx">         case StepsTimingFunction::StepPosition::JumpStart:
</span><span class="lines">@@ -68,7 +67,7 @@
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    builder.appendLiteral(")");
</del><ins>+    builder.append(')');
</ins><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/dom/Document.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -8496,6 +8496,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(RESOURCE_LOAD_STATISTICS)
</span><ins>+
</ins><span class="cx"> bool Document::hasRequestedPageSpecificStorageAccessWithUserInteraction(const RegistrableDomain& domain)
</span><span class="cx"> {
</span><span class="cx">     return m_registrableDomainRequestedPageSpecificStorageAccessWithUserInteraction == domain;
</span><span class="lines">@@ -8513,29 +8514,20 @@
</span><span class="cx"> 
</span><span class="cx"> void Document::downgradeReferrerToRegistrableDomain()
</span><span class="cx"> {
</span><del>-    auto referrerStr = referrer();
-    if (referrerStr.isEmpty())
</del><ins>+    URL referrerURL { { }, referrer() };
+    if (referrerURL.isEmpty())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    URL referrerURL { URL(), referrerStr };
-    auto referrerPort = referrerURL.port();
-    RegistrableDomain referrerRegistrableDomain { referrerURL };
-    auto referrerRegistrableDomainStr = referrerRegistrableDomain.string();
-    if (referrerRegistrableDomainStr.isEmpty())
</del><ins>+    auto domainString = RegistrableDomain { referrerURL }.string();
+    if (domainString.isEmpty())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    StringBuilder builder;
-    builder.append(referrerURL.protocol());
-    builder.appendLiteral("://");
-    builder.append(referrerRegistrableDomainStr);
-    if (referrerPort) {
-        builder.append(':');
-        builder.appendNumber(*referrerPort);
-    }
-    builder.append('/');
</del><ins>+    if (auto port = referrerURL.port())
+        m_referrerOverride = makeString(referrerURL.protocol(), "://", domainString, ':', *port, '/');
+    else
+        m_referrerOverride = makeString(referrerURL.protocol(), "://", domainString, '/');
+}
</ins><span class="cx"> 
</span><del>-    m_referrerOverride = builder.toString();
-}
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> void Document::setConsoleMessageListener(RefPtr<StringCallback>&& listener)
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingMarkupAccumulatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/MarkupAccumulator.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/MarkupAccumulator.cpp       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/editing/MarkupAccumulator.cpp  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -35,12 +35,12 @@
</span><span class="cx"> #include "HTMLElement.h"
</span><span class="cx"> #include "HTMLNames.h"
</span><span class="cx"> #include "HTMLTemplateElement.h"
</span><del>-#include <wtf/URL.h>
</del><span class="cx"> #include "ProcessingInstruction.h"
</span><span class="cx"> #include "XLinkNames.h"
</span><span class="cx"> #include "XMLNSNames.h"
</span><span class="cx"> #include "XMLNames.h"
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><ins>+#include <wtf/URL.h>
</ins><span class="cx"> #include <wtf/unicode/CharacterNames.h>
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -451,17 +451,12 @@
</span><span class="cx">     // http://www.w3.org/TR/DOM-Level-3-Core/namespaces-algorithms.html#normalizeDocumentAlgo
</span><span class="cx">     // Find a prefix following the pattern "NS" + index (starting at 1) and make sure this
</span><span class="cx">     // prefix is not declared in the current scope.
</span><del>-    StringBuilder builder;
</del><ins>+    AtomString name;
</ins><span class="cx">     do {
</span><del>-        builder.clear();
-        builder.appendLiteral("NS");
-        builder.appendNumber(++m_prefixLevel);
-        const AtomString& name = builder.toAtomString();
-        if (!namespaces.get(name.impl())) {
-            prefixedName.setPrefix(name);
-            return;
-        }
-    } while (true);
</del><ins>+        // FIXME: We should create makeAtomString, which would be more efficient.
+        name = makeString("NS", ++m_prefixLevel);
+    } while (namespaces.get(name.impl()));
+    prefixedName.setPrefix(name);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // https://html.spec.whatwg.org/#attribute's-serialised-name
</span></span></pre></div>
<a id="trunkSourceWebCoreeditingcocoaDataDetectionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm      2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -331,7 +331,7 @@
</span><span class="cx">         return makeString([path indexAtPosition:0], '/', [path indexAtPosition:1]);
</span><span class="cx">     default:
</span><span class="cx">         StringBuilder builder;
</span><del>-        builder.appendNumber([path indexAtPosition:0]);
</del><ins>+        builder.append([path indexAtPosition:0]);
</ins><span class="cx">         for (NSUInteger i = 1; i < length; i++)
</span><span class="cx">             builder.append('/', [path indexAtPosition:i]);
</span><span class="cx">         return builder.toString();
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLAnchorElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp  2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp     2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -173,10 +173,7 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: This should probably pass UseTransforms in the MapCoordinatesFlags.
</span><span class="cx">     auto absolutePosition = downcast<RenderImage>(*renderer).absoluteToLocal(FloatPoint(mouseEvent.pageX(), mouseEvent.pageY()));
</span><del>-    url.append('?');
-    url.appendNumber(std::lround(absolutePosition.x()));
-    url.append(',');
-    url.appendNumber(std::lround(absolutePosition.y()));
</del><ins>+    url.append('?', std::lround(absolutePosition.x()), ',', std::lround(absolutePosition.y()));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void HTMLAnchorElement::defaultEventHandler(Event& event)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp  2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp     2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -372,11 +372,8 @@
</span><span class="cx">     // Make sure we don't use more pixel memory than the system can support.
</span><span class="cx">     size_t requestedPixelMemory = 4 * width() * height();
</span><span class="cx">     if (activePixelMemory() + requestedPixelMemory > maxActivePixelMemory()) {
</span><del>-        StringBuilder stringBuilder;
-        stringBuilder.appendLiteral("Total canvas memory use exceeds the maximum limit (");
-        stringBuilder.appendNumber(maxActivePixelMemory() / 1024 / 1024);
-        stringBuilder.appendLiteral(" MB).");
-        document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, stringBuilder.toString());
</del><ins>+        auto message = makeString("Total canvas memory use exceeds the maximum limit (", maxActivePixelMemory() / 1024 / 1024, " MB).");
+        document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, message);
</ins><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -930,11 +927,8 @@
</span><span class="cx"> 
</span><span class="cx">     // Perform multiplication as floating point to avoid overflow
</span><span class="cx">     if (float(width()) * height() > maxCanvasArea) {
</span><del>-        StringBuilder stringBuilder;
-        stringBuilder.appendLiteral("Canvas area exceeds the maximum limit (width * height > ");
-        stringBuilder.appendNumber(maxCanvasArea);
-        stringBuilder.appendLiteral(").");
-        document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, stringBuilder.toString());
</del><ins>+        auto message = makeString("Canvas area exceeds the maximum limit (width * height > ", maxCanvasArea, ").");
+        document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, message);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="lines">@@ -941,11 +935,8 @@
</span><span class="cx">     // Make sure we don't use more pixel memory than the system can support.
</span><span class="cx">     size_t requestedPixelMemory = 4 * width() * height();
</span><span class="cx">     if (activePixelMemory() + requestedPixelMemory > maxActivePixelMemory()) {
</span><del>-        StringBuilder stringBuilder;
-        stringBuilder.appendLiteral("Total canvas memory use exceeds the maximum limit (");
-        stringBuilder.appendNumber(maxActivePixelMemory() / 1024 / 1024);
-        stringBuilder.appendLiteral(" MB).");
-        document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, stringBuilder.toString());
</del><ins>+        auto message = makeString("Total canvas memory use exceeds the maximum limit (", maxActivePixelMemory() / 1024 / 1024, " MB).");
+        document().addConsoleMessage(MessageSource::JS, MessageLevel::Warning, message);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderResourceLoadStatisticscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp   2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/loader/ResourceLoadStatistics.cpp      2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -507,8 +507,7 @@
</span><span class="cx">     builder.append('\n');
</span><span class="cx">     appendBoolean(builder, "isVeryPrevalentResource", isVeryPrevalentResource);
</span><span class="cx">     builder.append('\n');
</span><del>-    builder.appendLiteral("    dataRecordsRemoved: ");
-    builder.appendNumber(dataRecordsRemoved);
</del><ins>+    builder.append("    dataRecordsRemoved: ", dataRecordsRemoved);
</ins><span class="cx">     builder.append('\n');
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(WEB_API_STATISTICS)
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderSubresourceIntegritycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/SubresourceIntegrity.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/SubresourceIntegrity.cpp     2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/loader/SubresourceIntegrity.cpp        2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -207,21 +207,13 @@
</span><span class="cx"> 
</span><span class="cx"> String integrityMismatchDescription(const CachedResource& resource, const String& integrityMetadata)
</span><span class="cx"> {
</span><del>-    StringBuilder builder;
-
-    builder.append(resource.url().stringCenterEllipsizedToLength());
-    builder.append(". Failed integrity metadata check. ");
-    builder.append("Content length: ");
-    if (auto* resourceBuffer = resource.resourceBuffer())
-        builder.appendNumber(resourceBuffer->size());
-    else
-        builder.append("(no content)");
-    builder.append(", Expected content length: ");
-    builder.appendNumber(resource.response().expectedContentLength());
-    builder.append(", Expected metadata: ");
-    builder.append(integrityMetadata);
-
-    return builder.toString();
</del><ins>+    auto resourceURL = resource.url().stringCenterEllipsizedToLength();
+    if (auto resourceBuffer = resource.resourceBuffer()) {
+        return makeString(resourceURL, ". Failed integrity metadata check. Content length: ", resourceBuffer->size(), ", Expected content length: ",
+            resource.response().expectedContentLength(), ", Expected metadata: ", integrityMetadata);
+    }
+    return makeString(resourceURL, ". Failed integrity metadata check. Content length: (no content), Expected content length: ",
+        resource.response().expectedContentLength(), ", Expected metadata: ", integrityMetadata);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageIntersectionObservercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/IntersectionObserver.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/IntersectionObserver.cpp       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/page/IntersectionObserver.cpp  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -152,13 +152,7 @@
</span><span class="cx">     StringBuilder stringBuilder;
</span><span class="cx">     for (auto side : allBoxSides) {
</span><span class="cx">         auto& length = m_rootMargin.at(side);
</span><del>-        stringBuilder.appendNumber(length.intValue());
-        if (length.isPercent())
-            stringBuilder.append('%');
-        else
-            stringBuilder.appendLiteral("px");
-        if (side != BoxSide::Left)
-            stringBuilder.append(' ');
</del><ins>+        stringBuilder.append(length.intValue(), length.isPercent() ? "%" : "px", side != BoxSide::Left ? " " : "");
</ins><span class="cx">     }
</span><span class="cx">     return stringBuilder.toString();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageSecurityOriginDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/SecurityOriginData.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/SecurityOriginData.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/page/SecurityOriginData.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -31,7 +31,6 @@
</span><span class="cx"> #include "SecurityOrigin.h"
</span><span class="cx"> #include <wtf/FileSystem.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><del>-#include <wtf/text/StringBuilder.h>
</del><span class="cx"> #include <wtf/text/StringConcatenateNumbers.h>
</span><span class="cx"> #include <wtf/text/StringToIntegerConversion.h>
</span><span class="cx"> 
</span><span class="lines">@@ -71,22 +70,15 @@
</span><span class="cx"> 
</span><span class="cx"> String SecurityOriginData::databaseIdentifier() const
</span><span class="cx"> {
</span><del>-    // Historically, we've used the following (somewhat non-sensical) string
</del><ins>+    // Historically, we've used the following (somewhat nonsensical) string
</ins><span class="cx">     // for the databaseIdentifier of local files. We used to compute this
</span><span class="cx">     // string because of a bug in how we handled the scheme for file URLs.
</span><del>-    // Now that we've fixed that bug, we still need to produce this string
-    // to avoid breaking existing persistent state.
</del><ins>+    // Now that we've fixed that bug, we produce this string for compatibility
+    // with existing persistent state.
</ins><span class="cx">     if (equalIgnoringASCIICase(protocol, "file"))
</span><span class="cx">         return "file__0"_s;
</span><del>-    
-    StringBuilder stringBuilder;
-    stringBuilder.append(protocol);
-    stringBuilder.append(separatorCharacter);
-    stringBuilder.append(FileSystem::encodeForFileName(host));
-    stringBuilder.append(separatorCharacter);
-    stringBuilder.appendNumber(port.valueOr(0));
-    
-    return stringBuilder.toString();
</del><ins>+
+    return makeString(protocol, separatorCharacter, FileSystem::encodeForFileName(host), separatorCharacter, port.valueOr(0));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Optional<SecurityOriginData> SecurityOriginData::fromDatabaseIdentifier(const String& databaseIdentifier)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformDecimalcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Decimal.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Decimal.cpp        2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/platform/Decimal.cpp   2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1025,10 +1025,8 @@
</span><span class="cx">                 builder.append(digits[i]);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        if (adjustedExponent) {
-            builder.append(adjustedExponent < 0 ? "e" : "e+");
-            builder.appendNumber(adjustedExponent);
-        }
</del><ins>+        if (adjustedExponent)
+            builder.append(adjustedExponent < 0 ? "e" : "e+", adjustedExponent);
</ins><span class="cx">     }
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx"> #include <wtf/NeverDestroyed.h>
</span><span class="cx"> #include <wtf/text/CString.h>
</span><del>-#include <wtf/text/StringBuilder.h>
</del><span class="cx"> #include <wtf/text/TextStream.h>
</span><span class="cx"> #include <wtf/text/WTFString.h>
</span><span class="cx"> 
</span><span class="lines">@@ -598,11 +597,7 @@
</span><span class="cx"> String GraphicsLayer::animationNameForTransition(AnimatedPropertyID property)
</span><span class="cx"> {
</span><span class="cx">     // | is not a valid identifier character in CSS, so this can never conflict with a keyframe identifier.
</span><del>-    StringBuilder id;
-    id.appendLiteral("-|transition");
-    id.appendNumber(static_cast<int>(property));
-    id.append('-');
-    return id.toString();
</del><ins>+    return makeString("-|transition", static_cast<int>(property), '-');
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void GraphicsLayer::suspendAnimations(MonotonicTime)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaTileControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/TileController.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/TileController.cpp     2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/platform/graphics/ca/TileController.cpp        2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -756,8 +756,10 @@
</span><span class="cx"> 
</span><span class="cx"> Ref<PlatformCALayer> TileController::createTileLayer(const IntRect& tileRect, TileGrid& grid)
</span><span class="cx"> {
</span><ins>+    float temporaryScaleFactor = owningGraphicsLayer()->platformCALayerContentsScaleMultiplierForNewTiles(m_tileCacheLayer);
+    m_hasTilesWithTemporaryScaleFactor |= temporaryScaleFactor != 1;
+
</ins><span class="cx">     auto layer = m_tileCacheLayer->createCompatibleLayerOrTakeFromPool(PlatformCALayer::LayerTypeTiledBackingTileLayer, &grid, tileRect.size());
</span><del>-
</del><span class="cx">     layer->setAnchorPoint(FloatPoint3D());
</span><span class="cx">     layer->setPosition(tileRect.location());
</span><span class="cx">     layer->setBorderColor(m_tileDebugBorderColor);
</span><span class="lines">@@ -764,24 +766,12 @@
</span><span class="cx">     layer->setBorderWidth(m_tileDebugBorderWidth);
</span><span class="cx">     layer->setEdgeAntialiasingMask(0);
</span><span class="cx">     layer->setOpaque(m_tilesAreOpaque);
</span><del>-
-    StringBuilder nameBuilder;
-    nameBuilder.append("tile at ");
-    nameBuilder.appendNumber(tileRect.location().x());
-    nameBuilder.append(',');
-    nameBuilder.appendNumber(tileRect.location().y());
-    layer->setName(nameBuilder.toString());
-
-    float temporaryScaleFactor = owningGraphicsLayer()->platformCALayerContentsScaleMultiplierForNewTiles(m_tileCacheLayer);
-    m_hasTilesWithTemporaryScaleFactor |= temporaryScaleFactor != 1;
-
</del><ins>+    layer->setName(makeString("tile at ", tileRect.location().x(), ',', tileRect.location().y()));
</ins><span class="cx">     layer->setContentsScale(m_deviceScaleFactor * temporaryScaleFactor);
</span><span class="cx">     layer->setAcceleratesDrawing(m_acceleratesDrawing);
</span><span class="cx">     layer->setWantsDeepColorBackingStore(m_wantsDeepColorBackingStore);
</span><span class="cx">     layer->setSupportsSubpixelAntialiasedText(m_supportsSubpixelAntialiasedText);
</span><del>-
</del><span class="cx">     layer->setNeedsDisplay();
</span><del>-
</del><span class="cx">     return layer;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscawinPlatformCALayerWincpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp     2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.cpp        2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -698,39 +698,7 @@
</span><span class="cx"> 
</span><span class="cx"> static void printTransform(StringBuilder& builder, const CATransform3D& transform)
</span><span class="cx"> {
</span><del>-    builder.append('[');
-    builder.append(FormattedNumber::fixedPrecision(transform.m11));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m12));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m13));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m14));
-    builder.append("; ");
-    builder.append(FormattedNumber::fixedPrecision(transform.m21));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m22));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m23));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m24));
-    builder.append("; ");
-    builder.append(FormattedNumber::fixedPrecision(transform.m31));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m32));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m33));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m34));
-    builder.append("; ");
-    builder.append(FormattedNumber::fixedPrecision(transform.m41));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m42));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m43));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(transform.m44));
-    builder.append(']');
</del><ins>+    builder.append('[', FormattedNumber::fixedPrecision(transform.m11), ' ', FormattedNumber::fixedPrecision(transform.m12), ' ', FormattedNumber::fixedPrecision(transform.m13), ' ', FormattedNumber::fixedPrecision(transform.m14), "; ", FormattedNumber::fixedPrecision(transform.m21), ' ', FormattedNumber::fixedPrecision(transform.m22), ' ', FormattedNumber::fixedPrecision(transform.m23), ' ', FormattedNumber::fixedPrecision(transform.m24), "; ", FormattedNumber::fixedPrecision(transform.m31), ' ', FormattedNumber::fixedPrecision(transform.m32), ' ', FormattedNumber::fixedPrecision(transform.m33), ' ', FormattedNumber::fixedPrecision(transform.m34), "; ", FormattedNumber::fixedPrecision(transform.m41), ' ', FormattedNumber::fixedPrecision(transform.m42), ' ', FormattedNumber::fixedPrecision(transform.m43), ' ', FormattedNumber::fixedPrecision(transform.m44), ']');
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void printColor(StringBuilder& builder, int indent, const String& label, CGColorRef color)
</span><span class="lines">@@ -772,30 +740,7 @@
</span><span class="cx">     case PlatformCALayer::LayerTypeCustom: layerTypeName = "custom-layer"; break;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    builder.append("(");
-    builder.append(layerTypeName);
-    builder.append(" [");
-    builder.append(FormattedNumber::fixedPrecision(layerPosition.x()));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(layerPosition.y()));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(layerPosition.z()));
-    builder.append("] [");
-    builder.append(FormattedNumber::fixedPrecision(layerBounds.x()));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(layerBounds.y()));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(layerBounds.width()));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(layerBounds.height()));
-    builder.append("] [");
-    builder.append(FormattedNumber::fixedPrecision(layerAnchorPoint.x()));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(layerAnchorPoint.y()));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(layerAnchorPoint.z()));
-    builder.append("] superlayer=");
-    builder.appendNumber(reinterpret_cast<unsigned long long>(layer->superlayer()));
</del><ins>+    builder.append('(', layerTypeName, " [", FormattedNumber::fixedPrecision(layerPosition.x()), ' ', FormattedNumber::fixedPrecision(layerPosition.y()), ' ', FormattedNumber::fixedPrecision(layerPosition.z()), "] [", FormattedNumber::fixedPrecision(layerBounds.x()), ' ', FormattedNumber::fixedPrecision(layerBounds.y()), ' ', FormattedNumber::fixedPrecision(layerBounds.width()), ' ', FormattedNumber::fixedPrecision(layerBounds.height()), "] [", FormattedNumber::fixedPrecision(layerAnchorPoint.x()), ' ', FormattedNumber::fixedPrecision(layerAnchorPoint.y()), ' ', FormattedNumber::fixedPrecision(layerAnchorPoint.z()), "] superlayer=", reinterpret_cast<unsigned long long>(layer->superlayer()));
</ins><span class="cx"> 
</span><span class="cx">     // Print name if needed
</span><span class="cx">     String layerName = CACFLayerGetName(layer->platformLayer());
</span><span class="lines">@@ -871,11 +816,7 @@
</span><span class="cx">             CGImageRef imageContents = static_cast<CGImageRef>(const_cast<void*>(layerContents));
</span><span class="cx">             builder.append('\n');
</span><span class="cx">             printIndent(builder, indent + 1);
</span><del>-            builder.append("(contents (image [");
-            builder.appendNumber(CGImageGetWidth(imageContents));
-            builder.append(' ');
-            builder.appendNumber(CGImageGetHeight(imageContents));
-            builder.append("]))");
</del><ins>+            builder.append("(contents (image [", CGImageGetWidth(imageContents), ' ', CGImageGetHeight(imageContents), "]))");
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         if (CFGetTypeID(layerContents) == CABackingStoreGetTypeID()) {
</span><span class="lines">@@ -883,11 +824,7 @@
</span><span class="cx">             CGImageRef imageContents = CABackingStoreGetCGImage(backingStore);
</span><span class="cx">             builder.append('\n');
</span><span class="cx">             printIndent(builder, indent + 1);
</span><del>-            builder.append("(contents (backing-store [");
-            builder.appendNumber(CGImageGetWidth(imageContents));
-            builder.append(' ');
-            builder.appendNumber(CGImageGetHeight(imageContents));
-            builder.append("]))");
</del><ins>+            builder.append("(contents (backing-store [", CGImageGetWidth(imageContents), ' ', CGImageGetHeight(imageContents), "]))");
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -916,17 +853,7 @@
</span><span class="cx">     CGRect rootBounds = bounds();
</span><span class="cx"> 
</span><span class="cx">     StringBuilder builder;
</span><del>-    builder.append("\n\n** Render tree at time ");
-    builder.append(FormattedNumber::fixedPrecision(MonotonicTime::now().secondsSinceEpoch().seconds()));
-    builder.append(" (bounds ");
-    builder.append(FormattedNumber::fixedPrecision(rootBounds.origin.x));
-    builder.append(", ");
-    builder.append(FormattedNumber::fixedPrecision(rootBounds.origin.y));
-    builder.append(' ');
-    builder.append(FormattedNumber::fixedPrecision(rootBounds.size.width));
-    builder.append('x');
-    builder.append(FormattedNumber::fixedPrecision(rootBounds.size.height));
-    builder.append(") **\n\n");
</del><ins>+    builder.append("\n\n** Render tree at time ", FormattedNumber::fixedPrecision(MonotonicTime::now().secondsSinceEpoch().seconds()), " (bounds ", FormattedNumber::fixedPrecision(rootBounds.origin.x), ", ", FormattedNumber::fixedPrecision(rootBounds.origin.y), ' ', FormattedNumber::fixedPrecision(rootBounds.size.width), 'x', FormattedNumber::fixedPrecision(rootBounds.size.height), ") **\n\n");
</ins><span class="cx"> 
</span><span class="cx">     // Print layer tree from the root
</span><span class="cx">     printLayer(builder, this, 0);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmediarecorderMediaRecorderPrivateMockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -88,9 +88,7 @@
</span><span class="cx"> 
</span><span class="cx"> void MediaRecorderPrivateMock::generateMockCounterString()
</span><span class="cx"> {
</span><del>-    m_buffer.append(" Counter: ");
-    m_buffer.appendNumber(++m_counter);
-    m_buffer.append("\r\n---------\r\n");
</del><ins>+    m_buffer.append(" Counter: ", ++m_counter, "\r\n---------\r\n");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void MediaRecorderPrivateMock::fetchData(FetchDataCallback&& completionHandler)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkProxyServercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/ProxyServer.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/ProxyServer.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/platform/network/ProxyServer.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -32,6 +32,9 @@
</span><span class="cx"> 
</span><span class="cx"> static void appendProxyServerString(StringBuilder& builder, const ProxyServer& proxyServer)
</span><span class="cx"> {
</span><ins>+    ASSERT(!proxyServer.hostName().isNull());
+    ASSERT(proxyServer.port() != -1);
+
</ins><span class="cx">     switch (proxyServer.type()) {
</span><span class="cx">     case ProxyServer::Direct:
</span><span class="cx">         builder.appendLiteral("DIRECT");
</span><span class="lines">@@ -43,16 +46,8 @@
</span><span class="cx">     case ProxyServer::SOCKS:
</span><span class="cx">         builder.appendLiteral("SOCKS");
</span><span class="cx">         break;
</span><del>-    }
-    
-    builder.append(' ');
-
-    ASSERT(!proxyServer.hostName().isNull());
-    builder.append(proxyServer.hostName());
-
-    builder.append(':');
-    ASSERT(proxyServer.port() != -1);
-    builder.appendNumber(proxyServer.port());
</del><ins>+    }    
+    builder.append(' ', proxyServer.hostName(), ':', proxyServer.port());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> String toString(const Vector<ProxyServer>& proxyServers)
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTreeAsTextcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTreeAsText.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTreeAsText.cpp      2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/rendering/RenderTreeAsText.cpp 2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -831,17 +831,10 @@
</span><span class="cx">                 result.appendLiteral("body");
</span><span class="cx">                 break;
</span><span class="cx">             }
</span><del>-            if (n->isShadowRoot()) {
-                result.append('{');
-                result.append(getTagName(n));
-                result.append('}');
-            } else {
-                result.appendLiteral("child ");
-                result.appendNumber(n->computeNodeIndex());
-                result.appendLiteral(" {");
-                result.append(getTagName(n));
-                result.append('}');
-            }
</del><ins>+            if (n->isShadowRoot())
+                result.append('{', getTagName(n), '}');
+            else
+                result.append("child ", n->computeNodeIndex(), " {", getTagName(n), '}');
</ins><span class="cx">         } else
</span><span class="cx">             result.appendLiteral("document");
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGPathUtilitiescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGPathUtilities.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGPathUtilities.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/svg/SVGPathUtilities.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -59,40 +59,16 @@
</span><span class="cx">         path.apply([&builder] (const PathElement& element) {
</span><span class="cx">             switch (element.type) {
</span><span class="cx">             case PathElement::Type::MoveToPoint:
</span><del>-                builder.append('M');
-                builder.appendNumber(element.points[0].x());
-                builder.append(' ');
-                builder.appendNumber(element.points[0].y());
</del><ins>+                builder.append('M', element.points[0].x(), ' ', element.points[0].y());
</ins><span class="cx">                 break;
</span><span class="cx">             case PathElement::Type::AddLineToPoint:
</span><del>-                builder.append('L');
-                builder.appendNumber(element.points[0].x());
-                builder.append(' ');
-                builder.appendNumber(element.points[0].y());
</del><ins>+                builder.append('L', element.points[0].x(), ' ', element.points[0].y());
</ins><span class="cx">                 break;
</span><span class="cx">             case PathElement::Type::AddQuadCurveToPoint:
</span><del>-                builder.append('Q');
-                builder.appendNumber(element.points[0].x());
-                builder.append(' ');
-                builder.appendNumber(element.points[0].y());
-                builder.append(',');
-                builder.appendNumber(element.points[1].x());
-                builder.append(' ');
-                builder.appendNumber(element.points[1].y());
</del><ins>+                builder.append('Q', element.points[0].x(), ' ', element.points[0].y(), ',', element.points[1].x(), ' ', element.points[1].y());
</ins><span class="cx">                 break;
</span><span class="cx">             case PathElement::Type::AddCurveToPoint:
</span><del>-                builder.append('C');
-                builder.appendNumber(element.points[0].x());
-                builder.append(' ');
-                builder.appendNumber(element.points[0].y());
-                builder.append(',');
-                builder.appendNumber(element.points[1].x());
-                builder.append(' ');
-                builder.appendNumber(element.points[1].y());
-                builder.append(',');
-                builder.appendNumber(element.points[2].x());
-                builder.append(' ');
-                builder.appendNumber(element.points[2].y());
</del><ins>+                builder.append('C', element.points[0].x(), ' ', element.points[0].y(), ',', element.points[1].x(), ' ', element.points[1].y(), ',', element.points[2].x(), ' ', element.points[2].y());
</ins><span class="cx">                 break;
</span><span class="cx">             case PathElement::Type::CloseSubpath:
</span><span class="cx">                 builder.append('Z');
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/testing/Internals.cpp  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -2345,55 +2345,40 @@
</span><span class="cx"> 
</span><span class="cx"> String Internals::parserMetaData(JSC::JSValue code)
</span><span class="cx"> {
</span><del>-    JSC::VM& vm = contextDocument()->vm();
-    JSC::CallFrame* callFrame = vm.topCallFrame;
-    JSC::JSGlobalObject* globalObject = callFrame->lexicalGlobalObject(vm);
</del><ins>+    auto& vm = contextDocument()->vm();
+    auto callFrame = vm.topCallFrame;
+    auto* globalObject = callFrame->lexicalGlobalObject(vm);
+
</ins><span class="cx">     ScriptExecutable* executable;
</span><del>-
</del><span class="cx">     if (!code || code.isNull() || code.isUndefined()) {
</span><span class="cx">         GetCallerCodeBlockFunctor iter;
</span><span class="cx">         callFrame->iterate(vm, iter);
</span><del>-        CodeBlock* codeBlock = iter.codeBlock();
-        executable = codeBlock->ownerExecutable();
-    } else if (code.isCallable(vm)) {
-        JSFunction* funcObj = JSC::jsCast<JSFunction*>(code.toObject(globalObject));
-        executable = funcObj->jsExecutable();
-    } else
</del><ins>+        executable = iter.codeBlock()->ownerExecutable();
+    } else if (code.isCallable(vm))
+        executable = JSC::jsCast<JSFunction*>(code.toObject(globalObject))->jsExecutable();
+    else
</ins><span class="cx">         return String();
</span><span class="cx"> 
</span><del>-    unsigned startLine = executable->firstLine();
-    unsigned startColumn = executable->startColumn();
-    unsigned endLine = executable->lastLine();
-    unsigned endColumn = executable->endColumn();
</del><ins>+    const char* prefix = "";
+    String functionName;
+    const char* suffix = "";
</ins><span class="cx"> 
</span><del>-    StringBuilder result;
-
</del><span class="cx">     if (executable->isFunctionExecutable()) {
</span><del>-        FunctionExecutable* funcExecutable = reinterpret_cast<FunctionExecutable*>(executable);
-        String inferredName = funcExecutable->ecmaName().string();
-        result.appendLiteral("function \"");
-        result.append(inferredName);
-        result.append('"');
</del><ins>+        prefix = "function \"";
+        functionName = static_cast<FunctionExecutable*>(executable)->ecmaName().string();
+        suffix = "\"";
</ins><span class="cx">     } else if (executable->isEvalExecutable())
</span><del>-        result.appendLiteral("eval");
</del><ins>+        prefix = "eval";
</ins><span class="cx">     else if (executable->isModuleProgramExecutable())
</span><del>-        result.appendLiteral("module");
</del><ins>+        prefix = "module";
</ins><span class="cx">     else if (executable->isProgramExecutable())
</span><del>-        result.appendLiteral("program");
</del><ins>+        prefix = "program";
</ins><span class="cx">     else
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx"> 
</span><del>-    result.appendLiteral(" { ");
-    result.appendNumber(startLine);
-    result.append(':');
-    result.appendNumber(startColumn);
-    result.appendLiteral(" - ");
-    result.appendNumber(endLine);
-    result.append(':');
-    result.appendNumber(endColumn);
-    result.appendLiteral(" }");
-
-    return result.toString();
</del><ins>+    return makeString(prefix, functionName, suffix, " { ",
+        executable->firstLine(), ':', executable->startColumn(), " - ",
+        executable->lastLine(), ':', executable->endColumn(), " }");
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void Internals::updateEditorUINowIfScheduled()
</span><span class="lines">@@ -4730,8 +4715,7 @@
</span><span class="cx">             builder.appendLiteral(", ");
</span><span class="cx">         else
</span><span class="cx">             justStarting = false;
</span><del>-
-        builder.appendNumber(coordinate.offset.toUnsigned());
</del><ins>+        builder.append(coordinate.offset.toUnsigned());
</ins><span class="cx">         if (coordinate.stop == ScrollSnapStop::Always)
</span><span class="cx">             builder.appendLiteral(" (always)");
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoretestingMockPageOverlayClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/MockPageOverlayClient.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/MockPageOverlayClient.cpp   2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/testing/MockPageOverlayClient.cpp      2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -88,17 +88,8 @@
</span><span class="cx"> 
</span><span class="cx"> void MockPageOverlayClient::drawRect(PageOverlay& overlay, GraphicsContext& context, const IntRect& dirtyRect)
</span><span class="cx"> {
</span><del>-    StringBuilder message;
-    message.appendLiteral("MockPageOverlayClient::drawRect dirtyRect (");
-    message.appendNumber(dirtyRect.x());
-    message.appendLiteral(", ");
-    message.appendNumber(dirtyRect.y());
-    message.appendLiteral(", ");
-    message.appendNumber(dirtyRect.width());
-    message.appendLiteral(", ");
-    message.appendNumber(dirtyRect.height());
-    message.appendLiteral(")");
-    overlay.page()->mainFrame().document()->addConsoleMessage(MessageSource::Other, MessageLevel::Debug, message.toString());
</del><ins>+    overlay.page()->mainFrame().document()->addConsoleMessage(MessageSource::Other, MessageLevel::Debug,
+        makeString("MockPageOverlayClient::drawRect dirtyRect (", dirtyRect.x(), ", ", dirtyRect.y(), ", ", dirtyRect.width(), ", ", dirtyRect.height(), ')'));
</ins><span class="cx"> 
</span><span class="cx">     GraphicsContextStateSaver stateSaver(context);
</span><span class="cx"> 
</span><span class="lines">@@ -117,14 +108,8 @@
</span><span class="cx"> 
</span><span class="cx"> bool MockPageOverlayClient::mouseEvent(PageOverlay& overlay, const PlatformMouseEvent& event)
</span><span class="cx"> {
</span><del>-    StringBuilder message;
-    message.appendLiteral("MockPageOverlayClient::mouseEvent location (");
-    message.appendNumber(event.position().x());
-    message.appendLiteral(", ");
-    message.appendNumber(event.position().y());
-    message.appendLiteral(")");
-    overlay.page()->mainFrame().document()->addConsoleMessage(MessageSource::Other, MessageLevel::Debug, message.toString());
-
</del><ins>+    overlay.page()->mainFrame().document()->addConsoleMessage(MessageSource::Other, MessageLevel::Debug,
+        makeString("MockPageOverlayClient::mouseEvent location (", event.position().x(), ", ", event.position().y(), ')'));
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXMLErrorscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XMLErrors.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XMLErrors.cpp   2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebCore/xml/XMLErrors.cpp      2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -78,13 +78,7 @@
</span><span class="cx"> void XMLErrors::appendErrorMessage(const String& typeString, TextPosition position, const char* message)
</span><span class="cx"> {
</span><span class="cx">     // <typeString> on line <lineNumber> at column <columnNumber>: <message>
</span><del>-    m_errorMessages.append(typeString);
-    m_errorMessages.appendLiteral(" on line ");
-    m_errorMessages.appendNumber(position.m_line.oneBasedInt());
-    m_errorMessages.appendLiteral(" at column ");
-    m_errorMessages.appendNumber(position.m_column.oneBasedInt());
-    m_errorMessages.appendLiteral(": ");
-    m_errorMessages.append(message);
</del><ins>+    m_errorMessages.append(typeString, " on line ", position.m_line.oneBasedInt(), " at column ", position.m_column.oneBasedInt(), ": ", message);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static inline Ref<Element> createXHTMLParserErrorHeader(Document& document, const String& errorMessages)
</span></span></pre></div>
<a id="trunkSourceWebDriverChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebDriver/ChangeLog (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebDriver/ChangeLog 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebDriver/ChangeLog    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2021-05-13  Darin Adler  <darin@apple.com>
+
+        Remove StringBuilder::appendNumber
+        https://bugs.webkit.org/show_bug.cgi?id=225732
+
+        Reviewed by Sam Weinig.
+
+        * SessionHost.cpp:
+        (WebDriver::SessionHost::sendCommandToBackend): Use append instead
+        of appendNumber.
+        * socket/HTTPServerSocket.cpp:
+        (WebDriver::HTTPRequestHandler::packHTTPMessage const): Ditto.
+
</ins><span class="cx"> 2021-05-09  Darin Adler  <darin@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Remove all remaining uses of the String::toInt family of functions
</span></span></pre></div>
<a id="trunkSourceWebDriverSessionHostcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebDriver/SessionHost.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebDriver/SessionHost.cpp   2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebDriver/SessionHost.cpp      2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -45,15 +45,9 @@
</span><span class="cx">     long sequenceID = ++lastSequenceID;
</span><span class="cx">     m_commandRequests.add(sequenceID, WTFMove(responseHandler));
</span><span class="cx">     StringBuilder messageBuilder;
</span><del>-    messageBuilder.appendLiteral("{\"id\":");
-    messageBuilder.appendNumber(sequenceID);
-    messageBuilder.appendLiteral(",\"method\":\"Automation.");
-    messageBuilder.append(command);
-    messageBuilder.append('"');
-    if (parameters) {
-        messageBuilder.appendLiteral(",\"params\":");
-        messageBuilder.append(parameters->toJSONString());
-    }
</del><ins>+    messageBuilder.append("{\"id\":", sequenceID, ",\"method\":\"Automation.", command, '"');
+    if (parameters)
+        messageBuilder.append(",\"params\":", parameters->toJSONString());
</ins><span class="cx">     messageBuilder.append('}');
</span><span class="cx">     sendMessageToBackend(messageBuilder.toString());
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebDriversocketHTTPServerSocketcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebDriver/socket/HTTPServerSocket.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebDriver/socket/HTTPServerSocket.cpp       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebDriver/socket/HTTPServerSocket.cpp  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -117,23 +117,12 @@
</span><span class="cx">     StringBuilder builder;
</span><span class="cx">     const char* EOL = "\r\n";
</span><span class="cx"> 
</span><del>-    builder.append("HTTP/1.0 ");
-    builder.appendNumber(response.statusCode);
-    builder.append(" ");
-    builder.append(response.statusCode == 200 ? "OK" : "ERROR");
-    builder.append(EOL);
</del><ins>+    builder.append("HTTP/1.0 ", response.statusCode, ' ', response.statusCode == 200 ? "OK" : "ERROR", EOL);
</ins><span class="cx"> 
</span><span class="cx">     if (!response.data.isNull()) {
</span><del>-        builder.append("Content-Type: ");
-        builder.append(response.contentType);
-        builder.append(EOL);
-
-        builder.append("Content-Length: ");
-        builder.appendNumber(response.data.length());
-        builder.append(EOL);
-
-        builder.append("Cache-Control: no-cache");
-        builder.append(EOL);
</del><ins>+        builder.append("Content-Type: ", response.contentType, EOL,
+            "Content-Length: ", response.data.length(), EOL,
+            "Cache-Control: no-cache", EOL);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     builder.append(EOL);
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKit/ChangeLog       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2021-05-13  Darin Adler  <darin@apple.com>
+
+        Remove StringBuilder::appendNumber
+        https://bugs.webkit.org/show_bug.cgi?id=225732
+
+        Reviewed by Sam Weinig.
+
+        * NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
+        (WebKit::buildList): Use append instead of appendNumber.
+        (WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources): Ditto.
+        (WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const): Ditto.
+        (WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString): Ditto.
+        (WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString): Ditto.
+        * Shared/WebMemorySampler.cpp:
+        (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile): Ditto.
+        * UIProcess/API/glib/WebKitWebView.cpp:
+        (webkitWebViewRunJavaScriptCallback): Ditto.
+        * UIProcess/WebBackForwardList.cpp:
+        (WebKit::WebBackForwardList::loggingString): Ditto.
+
+        * WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
+        (PageResourceLoadClient::didReceiveResponseForResource): Use makeString instead
+        of StringBuilder.
+
+        * WebProcess/Plugins/PluginView.cpp:
+        (WebKit::buildHTTPHeaders): Use append instead of appendNumber.
+
</ins><span class="cx"> 2021-05-13  Peng Liu  <peng.liu6@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Subtitles in Safari fail to appear after switching language
</span></span></pre></div>
<a id="trunkSourceWebKitNetworkProcessClassifierResourceLoadStatisticsDatabaseStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1331,7 +1331,7 @@
</span><span class="cx">     for (auto domainID : values) {
</span><span class="cx">         if (!builder.isEmpty())
</span><span class="cx">             builder.appendLiteral(", ");
</span><del>-        builder.appendNumber(domainID);
</del><ins>+        builder.append(domainID);
</ins><span class="cx">     }
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="lines">@@ -1381,7 +1381,7 @@
</span><span class="cx">     for (auto value : results.keys()) {
</span><span class="cx">         if (!builder.isEmpty())
</span><span class="cx">             builder.appendLiteral(", ");
</span><del>-        builder.appendNumber(value);
</del><ins>+        builder.append(value);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto domainIDsOfInterest = builder.toString();
</span><span class="lines">@@ -2895,8 +2895,7 @@
</span><span class="cx">     builder.append('\n');
</span><span class="cx">     appendBoolean(builder, "isVeryPrevalentResource", m_getResourceDataByDomainNameStatement->getColumnInt(IsVeryPrevalentIndex));
</span><span class="cx">     builder.append('\n');
</span><del>-    builder.appendLiteral("    dataRecordsRemoved: ");
-    builder.appendNumber(m_getResourceDataByDomainNameStatement->getColumnInt(DataRecordsRemovedIndex));
</del><ins>+    builder.append("    dataRecordsRemoved: ", m_getResourceDataByDomainNameStatement->getColumnInt(DataRecordsRemovedIndex));
</ins><span class="cx">     builder.append('\n');
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3410,12 +3409,7 @@
</span><span class="cx">     auto sourceID = statement->getColumnInt(2);
</span><span class="cx"> 
</span><span class="cx">     StringBuilder builder;
</span><del>-    builder.appendLiteral("Source site: ");
-    builder.append(sourceSiteDomain);
-    builder.appendLiteral("\nAttribute on site: ");
-    builder.append(destinationSiteDomain);
-    builder.appendLiteral("\nSource ID: ");
-    builder.appendNumber(sourceID);
</del><ins>+    builder.append("Source site: ", sourceSiteDomain, "\nAttribute on site: ", destinationSiteDomain, "\nSource ID: ", sourceID);
</ins><span class="cx"> 
</span><span class="cx">     if (attributionType == PrivateClickMeasurementAttributionType::Attributed) {
</span><span class="cx">         auto attributionTriggerData = statement->getColumnInt(3);
</span><span class="lines">@@ -3423,11 +3417,7 @@
</span><span class="cx">         auto earliestTimeToSend = statement->getColumnInt(6);
</span><span class="cx"> 
</span><span class="cx">         if (attributionTriggerData != -1) {
</span><del>-            builder.appendLiteral("\nAttribution trigger data: ");
-            builder.appendNumber(attributionTriggerData);
-            builder.appendLiteral("\nAttribution priority: ");
-            builder.appendNumber(priority);
-            builder.appendLiteral("\nAttribution earliest time to send: ");
</del><ins>+            builder.append("\nAttribution trigger data: ", attributionTriggerData, "\nAttribution priority: ", priority, "\nAttribution earliest time to send: ");
</ins><span class="cx">             if (earliestTimeToSend == -1)
</span><span class="cx">                 builder.appendLiteral("Not set");
</span><span class="cx">             else {
</span><span class="lines">@@ -3466,13 +3456,9 @@
</span><span class="cx">     StringBuilder builder;
</span><span class="cx">     while (unattributedScopedStatement->step() == SQLITE_ROW) {
</span><span class="cx">         if (!unattributedNumber)
</span><del>-            builder.appendLiteral("Unattributed Private Click Measurements:\n");
-        else
-            builder.append('\n');
-        builder.appendLiteral("WebCore::PrivateClickMeasurement ");
-        builder.appendNumber(++unattributedNumber);
-        builder.append('\n');
-        builder.append(attributionToString(unattributedScopedStatement.get(), PrivateClickMeasurementAttributionType::Unattributed));
</del><ins>+            builder.appendLiteral("Unattributed Private Click Measurements:");
+        builder.append("\nWebCore::PrivateClickMeasurement ", ++unattributedNumber, '\n',
+            attributionToString(unattributedScopedStatement.get(), PrivateClickMeasurementAttributionType::Unattributed));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     auto attributedScopedStatement = this->scopedStatement(m_allAttributedPrivateClickMeasurementStatement, allAttributedPrivateClickMeasurementQuery, "privateClickMeasurementToString"_s);
</span><span class="lines">@@ -3484,16 +3470,14 @@
</span><span class="cx"> 
</span><span class="cx">     unsigned attributedNumber = 0;
</span><span class="cx">     while (attributedScopedStatement->step() == SQLITE_ROW) {
</span><del>-        if (unattributedNumber)
-            builder.append('\n');
-        if (!attributedNumber)
</del><ins>+        if (!attributedNumber) {
+            if (unattributedNumber)
+                builder.append('\n');
</ins><span class="cx">             builder.appendLiteral("Attributed Private Click Measurements:\n");
</span><del>-        else
</del><ins>+        } else
</ins><span class="cx">             builder.append('\n');
</span><del>-        builder.appendLiteral("WebCore::PrivateClickMeasurement ");
-        builder.appendNumber(++attributedNumber + unattributedNumber);
-        builder.append('\n');
-        builder.append(attributionToString(attributedScopedStatement.get(), PrivateClickMeasurementAttributionType::Attributed));
</del><ins>+        builder.append("WebCore::PrivateClickMeasurement ", ++attributedNumber + unattributedNumber, '\n',
+            attributionToString(attributedScopedStatement.get(), PrivateClickMeasurementAttributionType::Attributed));
</ins><span class="cx">     }
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitSharedWebMemorySamplercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/Shared/WebMemorySampler.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/Shared/WebMemorySampler.cpp  2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKit/Shared/WebMemorySampler.cpp     2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -172,11 +172,9 @@
</span><span class="cx">     if (!memoryStats.values.isEmpty()) {
</span><span class="cx">         statString.append(separator);
</span><span class="cx">         for (size_t i = 0; i < memoryStats.values.size(); ++i) {
</span><del>-            statString.append('\n');
-            statString.append(separator);
-            statString.append(memoryStats.keys[i]);
</del><ins>+            statString.append('\n', separator, memoryStats.keys[i]);
</ins><span class="cx">             appendSpaces(statString, 35 - memoryStats.keys[i].length());
</span><del>-            statString.appendNumber(memoryStats.values[i]);
</del><ins>+            statString.append(memoryStats.values[i]);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx">     statString.append('\n');
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessAPIglibWebKitWebViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -3779,14 +3779,10 @@
</span><span class="cx">         StringBuilder builder;
</span><span class="cx">         if (!exceptionDetails.sourceURL.isEmpty()) {
</span><span class="cx">             builder.append(exceptionDetails.sourceURL);
</span><del>-            if (exceptionDetails.lineNumber > 0) {
-                builder.append(':');
-                builder.appendNumber(exceptionDetails.lineNumber);
-            }
-            if (exceptionDetails.columnNumber > 0) {
-                builder.append(':');
-                builder.appendNumber(exceptionDetails.columnNumber);
-            }
</del><ins>+            if (exceptionDetails.lineNumber > 0)
+                builder.append(':', exceptionDetails.lineNumber);
+            if (exceptionDetails.columnNumber > 0)
+                builder.append(':', exceptionDetails.columnNumber);
</ins><span class="cx">             builder.appendLiteral(": ");
</span><span class="cx">         }
</span><span class="cx">         builder.append(exceptionDetails.message);
</span></span></pre></div>
<a id="trunkSourceWebKitUIProcessWebBackForwardListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp     2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKit/UIProcess/WebBackForwardList.cpp        2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -489,15 +489,7 @@
</span><span class="cx"> {
</span><span class="cx">     StringBuilder builder;
</span><span class="cx"> 
</span><del>-    builder.appendLiteral("WebBackForwardList 0x");
-    builder.append(hex(reinterpret_cast<uintptr_t>(this)));
-    builder.appendLiteral(" - ");
-    builder.appendNumber(m_entries.size());
-    builder.appendLiteral(" entries, has current index ");
-    builder.append(m_currentIndex ? "YES" : "NO");
-    builder.appendLiteral(" (");
-    builder.appendNumber(m_currentIndex ? *m_currentIndex : 0);
-    builder.append(')');
</del><ins>+    builder.append("WebBackForwardList 0x", hex(reinterpret_cast<uintptr_t>(this)), " - ", m_entries.size(), " entries, has current index ", m_currentIndex ? "YES" : "NO", " (", m_currentIndex ? *m_currentIndex : 0, ')');
</ins><span class="cx"> 
</span><span class="cx">     for (size_t i = 0; i < m_entries.size(); ++i) {
</span><span class="cx">         builder.append('\n');
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessInjectedBundleAPIglibWebKitWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp 2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp    2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -274,13 +274,8 @@
</span><span class="cx"> 
</span><span class="cx">         // Post on the console as well to be consistent with the inspector.
</span><span class="cx">         if (response.httpStatusCode() >= 400) {
</span><del>-            StringBuilder errorMessage;
-            errorMessage.appendLiteral("Failed to load resource: the server responded with a status of ");
-            errorMessage.appendNumber(response.httpStatusCode());
-            errorMessage.appendLiteral(" (");
-            errorMessage.append(response.httpStatusText());
-            errorMessage.append(')');
-            webkitWebPageDidSendConsoleMessage(m_webPage, MessageSource::Network, MessageLevel::Error, errorMessage.toString(), 0, response.url().string());
</del><ins>+            String errorMessage = makeString("Failed to load resource: the server responded with a status of ", response.httpStatusCode(), " (", response.httpStatusText(), ')');
+            webkitWebPageDidSendConsoleMessage(m_webPage, MessageSource::Network, MessageLevel::Error, errorMessage, 0, response.url().string());
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitWebProcessPluginsPluginViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -190,17 +190,9 @@
</span><span class="cx">         return String();
</span><span class="cx"> 
</span><span class="cx">     StringBuilder header;
</span><del>-    header.appendLiteral("HTTP ");
-    header.appendNumber(response.httpStatusCode());
-    header.append(' ');
-    header.append(response.httpStatusText());
-    header.append('\n');
-    for (auto& field : response.httpHeaderFields()) {
-        header.append(field.key);
-        header.appendLiteral(": ");
-        header.append(field.value);
-        header.append('\n');
-    }
</del><ins>+    header.append("HTTP ", response.httpStatusCode(), ' ', response.httpStatusText(), '\n');
+    for (auto& field : response.httpHeaderFields())
+        header.append(field.key, ": ", field.value, '\n');
</ins><span class="cx"> 
</span><span class="cx">     // If the content is encoded (most likely compressed), then don't send its length to the plugin,
</span><span class="cx">     // which is only interested in the decoded length, not yet known at the moment.
</span></span></pre></div>
<a id="trunkSourceWebKitLegacywinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/win/ChangeLog (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/win/ChangeLog  2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKitLegacy/win/ChangeLog     2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2021-05-13  Darin Adler  <darin@apple.com>
+
+        Remove StringBuilder::appendNumber
+        https://bugs.webkit.org/show_bug.cgi?id=225732
+
+        Reviewed by Sam Weinig.
+
+        * WebKitStatistics.cpp:
+        (WebKitStatistics::comClassNameCounts): Use append instead of
+        appendNumber.
+
</ins><span class="cx"> 2021-05-12  Chris Dumez  <cdumez@apple.com>
</span><span class="cx"> 
</span><span class="cx">         Notification.requestPermission() should return a Promise
</span></span></pre></div>
<a id="trunkSourceWebKitLegacywinWebKitStatisticscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKitLegacy/win/WebKitStatistics.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKitLegacy/win/WebKitStatistics.cpp       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Source/WebKitLegacy/win/WebKitStatistics.cpp  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -150,12 +150,8 @@
</span><span class="cx">         return E_POINTER;
</span><span class="cx"> 
</span><span class="cx">     StringBuilder builder;
</span><del>-    for (auto& slot : gClassNameCount()) {
-        builder.appendNumber(slot.value);
-        builder.append('\t');
-        builder.append(slot.key);
-        builder.append('\n');
-    }
</del><ins>+    for (auto& slot : gClassNameCount())
+        builder.append(slot.value, '\t', slot.key, '\n');
</ins><span class="cx">     *output = BString(builder.toString()).release();
</span><span class="cx">     return S_OK;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Tools/ChangeLog       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2021-05-13  Darin Adler  <darin@apple.com>
+
+        Remove StringBuilder::appendNumber
+        https://bugs.webkit.org/show_bug.cgi?id=225732
+
+        Reviewed by Sam Weinig.
+
+        * TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
+        Test append with a number instead of appendNumber.
+
+        * TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
+        Use append instead of appendNumber.
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::dumpResponseDescriptionSuitableForTestResult): Use append instead
+        of appendNumber.
+        (WTR::dumpFrameScrollPosition): Ditto.
+        (WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): Use makeString
+        instead of StringBuilder.
+        (WTR::InjectedBundlePage::shouldCacheResponse): Ditto.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::attributesOfElement): Use append instead of appendNumber.
+        (WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
+        (WTR::stringAtOffset): Ditto.
+
</ins><span class="cx"> 2021-05-13  Dmitry Bezhetskov  <dbezhetskov@igalia.com>
</span><span class="cx"> 
</span><span class="cx">         Add dbezhetskov as a commiter
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWTFStringBuildercpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringBuilder.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -123,7 +123,7 @@
</span><span class="cx"> {
</span><span class="cx">     constexpr int intMin = std::numeric_limits<int>::min();
</span><span class="cx">     StringBuilder builder;
</span><del>-    builder.appendNumber(intMin);
</del><ins>+    builder.append(intMin);
</ins><span class="cx"> 
</span><span class="cx">     std::stringstream stringStream;
</span><span class="cx">     stringStream << intMin;
</span></span></pre></div>
<a id="trunkToolsTestWebKitAPITestsWebKitGLibTestAutomationSessioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp     2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp        2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -88,15 +88,9 @@
</span><span class="cx">     {
</span><span class="cx">         static long sequenceID = 0;
</span><span class="cx">         StringBuilder messageBuilder;
</span><del>-        messageBuilder.appendLiteral("{\"id\":");
-        messageBuilder.appendNumber(++sequenceID);
-        messageBuilder.appendLiteral(",\"method\":\"Automation.");
-        messageBuilder.append(command);
-        messageBuilder.append('"');
-        if (!parameters.isNull()) {
-            messageBuilder.appendLiteral(",\"params\":");
-            messageBuilder.append(parameters);
-        }
</del><ins>+        messageBuilder.append("{\"id\":", ++sequenceID, ",\"method\":\"Automation.", command, '"');
+        if (!parameters.isNull())
+            messageBuilder.append(",\"params\":", parameters);
</ins><span class="cx">         messageBuilder.append('}');
</span><span class="cx">         m_connection->sendMessage("SendMessageToBackend", g_variant_new("(tts)", m_connectionID, m_target.id, messageBuilder.toString().utf8().data()));
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleInjectedBundlePagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp       2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp  2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -450,16 +450,9 @@
</span><span class="cx">         stringBuilder.appendLiteral("(null)");
</span><span class="cx">         return;
</span><span class="cx">     }
</span><del>-    stringBuilder.appendLiteral("<NSURLResponse ");
-    stringBuilder.append(pathSuitableForTestResult(url.get()));
-    stringBuilder.appendLiteral(", http status code ");
-    stringBuilder.appendNumber(WKURLResponseHTTPStatusCode(response));
-
-    if (shouldDumpResponseHeaders) {
-        stringBuilder.appendLiteral(", ");
-        stringBuilder.appendNumber(InjectedBundlePage::responseHeaderCount(response));
-        stringBuilder.appendLiteral(" headers");
-    }
</del><ins>+    stringBuilder.append("<NSURLResponse ", pathSuitableForTestResult(url.get()), ", http status code ", WKURLResponseHTTPStatusCode(response));
+    if (shouldDumpResponseHeaders)
+        stringBuilder.append(", ", InjectedBundlePage::responseHeaderCount(response), " headers");
</ins><span class="cx">     stringBuilder.append('>');
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -706,18 +699,9 @@
</span><span class="cx">     double y = numericWindowProperty(frame, "pageYOffset");
</span><span class="cx">     if (fabs(x) <= 0.00000001 && fabs(y) <= 0.00000001)
</span><span class="cx">         return;
</span><del>-
-    if (shouldIncludeFrameName) {
-        auto name = adoptWK(WKBundleFrameCopyName(frame));
-        stringBuilder.appendLiteral("frame '");
-        stringBuilder.append(toWTFString(name));
-        stringBuilder.appendLiteral("' ");
-    }
-    stringBuilder.appendLiteral("scrolled to ");
-    stringBuilder.appendNumber(x);
-    stringBuilder.append(',');
-    stringBuilder.appendNumber(y);
-    stringBuilder.append('\n');
</del><ins>+    if (shouldIncludeFrameName)
+        stringBuilder.append("frame '", toWTFString(adoptWK(WKBundleFrameCopyName(frame))), "' ");
+    stringBuilder.append("scrolled to ", x, ',', y, '\n');
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> static void dumpDescendantFrameScrollPositions(WKBundleFrameRef frame, StringBuilder& stringBuilder)
</span><span class="lines">@@ -997,15 +981,8 @@
</span><span class="cx">     if (injectedBundle.testRunner()->shouldDumpFrameLoadCallbacks())
</span><span class="cx">         dumpLoadEvent(frame, "didFinishDocumentLoadForFrame");
</span><span class="cx"> 
</span><del>-    unsigned pendingFrameUnloadEvents = WKBundleFrameGetPendingUnloadCount(frame);
-    if (pendingFrameUnloadEvents) {
-        StringBuilder stringBuilder;
-        stringBuilder.append(frameToStr(frame));
-        stringBuilder.appendLiteral(" - has ");
-        stringBuilder.appendNumber(pendingFrameUnloadEvents);
-        stringBuilder.appendLiteral(" onunload handler(s)\n");
-        injectedBundle.outputText(stringBuilder.toString());
-    }
</del><ins>+    if (unsigned pendingFrameUnloadEvents = WKBundleFrameGetPendingUnloadCount(frame))
+        injectedBundle.outputText(makeString(frameToStr(frame), " - has ", pendingFrameUnloadEvents, " onunload handler(s)\n"));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void InjectedBundlePage::didHandleOnloadEventsForFrame(WKBundleFrameRef frame)
</span><span class="lines">@@ -1216,10 +1193,7 @@
</span><span class="cx">     if (!injectedBundle.testRunner()->shouldDumpWillCacheResponse())
</span><span class="cx">         return true;
</span><span class="cx"> 
</span><del>-    StringBuilder stringBuilder;
-    stringBuilder.appendNumber(identifier);
-    stringBuilder.appendLiteral(" - willCacheResponse: called\n");
-    injectedBundle.outputText(stringBuilder.toString());
</del><ins>+    injectedBundle.outputText(makeString(identifier, " - willCacheResponse: called\n"));
</ins><span class="cx"> 
</span><span class="cx">     // The default behavior is the cache the response.
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleatkAccessibilityUIElementAtkcpp"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (277436 => 277437)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp    2021-05-13 16:01:26 UTC (rev 277436)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp       2021-05-13 16:18:32 UTC (rev 277437)
</span><span class="lines">@@ -563,8 +563,7 @@
</span><span class="cx"> {
</span><span class="cx">     StringBuilder builder;
</span><span class="cx"> 
</span><del>-    builder.append(element->role()->string());
-    builder.append('\n');
</del><ins>+    builder.append(element->role()->string(), '\n');
</ins><span class="cx"> 
</span><span class="cx">     // For the parent we print its role and its name, if available.
</span><span class="cx">     builder.appendLiteral("AXParent: ");
</span><span class="lines">@@ -573,29 +572,21 @@
</span><span class="cx">     if (atkParent) {
</span><span class="cx">         builder.append(roleToString(atkParent));
</span><span class="cx">         const char* parentName = atk_object_get_name(atkParent);
</span><del>-        if (parentName && parentName[0]) {
-            builder.appendLiteral(": ");
-            builder.append(parentName);
-        }
</del><ins>+        if (parentName && parentName[0])
+            builder.append(": ", parentName);
</ins><span class="cx">     } else
</span><span class="cx">         builder.appendLiteral("(null)");
</span><span class="cx">     builder.append('\n');
</span><span class="cx"> 
</span><del>-    builder.appendLiteral("AXChildren: ");
-    builder.appendNumber(element->childrenCount());
-    builder.append('\n');
</del><ins>+    builder.append("AXChildren: ", element->childrenCount(), '\n');
</ins><span class="cx"> 
</span><del>-    builder.appendLiteral("AXPosition:  { ");
-    builder.append(FormattedNumber::fixedPrecision(element->x(), 6, KeepTrailingZeros));
-    builder.appendLiteral(", ");
-    builder.append(FormattedNumber::fixedPrecision(element->y(), 6, KeepTrailingZeros));
-    builder.appendLiteral(" }\n");
</del><ins>+    builder.append("AXPosition:  { ", FormattedNumber::fixedPrecision(element->x(), 6, KeepTrailingZeros));
+    builder.append(", ", FormattedNumber::fixedPrecision(element->y(), 6, KeepTrailingZeros));
+    builder.append(" }\n");
</ins><span class="cx"> 
</span><del>-    builder.appendLiteral("AXSize: { ");
-    builder.append(FormattedNumber::fixedPrecision(element->width(), 6, KeepTrailingZeros));
-    builder.appendLiteral(", ");
-    builder.append(FormattedNumber::fixedPrecision(element->height(), 6, KeepTrailingZeros));
-    builder.appendLiteral(" }\n");
</del><ins>+    builder.append("AXSize: { ", FormattedNumber::fixedPrecision(element->width(), 6, KeepTrailingZeros));
+    builder.append(", ", FormattedNumber::fixedPrecision(element->height(), 6, KeepTrailingZeros));
+    builder.append(" }\n");
</ins><span class="cx"> 
</span><span class="cx">     String title = element->title()->string();
</span><span class="cx">     if (!title.isEmpty()) {
</span><span class="lines">@@ -604,62 +595,29 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     String description = element->description()->string();
</span><del>-    if (!description.isEmpty()) {
-        builder.append(description.utf8().data());
-        builder.append('\n');
-    }
</del><ins>+    if (!description.isEmpty())
+        builder.append(description.utf8().data(), '\n');
</ins><span class="cx"> 
</span><span class="cx">     String value = element->stringValue()->string();
</span><del>-    if (!value.isEmpty()) {
-        builder.append(value);
-        builder.append('\n');
-    }
</del><ins>+    if (!value.isEmpty())
+        builder.append(value, '\n');
</ins><span class="cx"> 
</span><del>-    builder.appendLiteral("AXFocusable: ");
-    builder.appendNumber(element->isFocusable());
-    builder.append('\n');
</del><ins>+    builder.append("AXFocusable: ", element->isFocusable(), '\n');
+    builder.append("AXFocused: ", element->isFocused(), '\n');
+    builder.append("AXSelectable: ", element->isSelectable(), '\n');
+    builder.append("AXSelected: ", element->isSelected(), '\n');
+    builder.append("AXMultiSelectable: ", element->isMultiSelectable(), '\n');
+    builder.append("AXEnabled: ", element->isEnabled(), '\n');
+    builder.append("AXExpanded: ", element->isExpanded(), '\n');
+    builder.append("AXRequired: ", element->isRequired(), '\n');
+    builder.append("AXChecked: ", element->isChecked(), '\n');
</ins><span class="cx"> 
</span><del>-    builder.appendLiteral("AXFocused: ");
-    builder.appendNumber(element->isFocused());
-    builder.append('\n');
-
-    builder.appendLiteral("AXSelectable: ");
-    builder.appendNumber(element->isSelectable());
-    builder.append('\n');
-
-    builder.appendLiteral("AXSelected: ");
-    builder.appendNumber(element->isSelected());
-    builder.append('\n');
-
-    builder.appendLiteral("AXMultiSelectable: ");
-    builder.appendNumber(element->isMultiSelectable());
-    builder.append('\n');
-
-    builder.appendLiteral("AXEnabled: ");
-    builder.appendNumber(element->isEnabled());
-    builder.append('\n');
-
-    builder.appendLiteral("AXExpanded: ");
-    builder.appendNumber(element->isExpanded());
-    builder.append('\n');
-
-    builder.appendLiteral("AXRequired: ");
-    builder.appendNumber(element->isRequired());
-    builder.append('\n');
-
-    builder.appendLiteral("AXChecked: ");
-    builder.appendNumber(element->isChecked());
-    builder.append('\n');
-
</del><span class="cx">     String url = element->url()->string();
</span><del>-    if (!url.isEmpty()) {
-        builder.append(url);
-        builder.append('\n');
-    }
</del><ins>+    if (!url.isEmpty())
+        builder.append(url, '\n');
</ins><span class="cx"> 
</span><span class="cx">     // We append the ATK specific attributes as a single line at the end.
</span><del>-    builder.appendLiteral("AXPlatformAttributes: ");
-    builder.append(getAtkAttributeSetAsString(element->platformUIElement().get(), ObjectAttributeType));
</del><ins>+    builder.append("AXPlatformAttributes: ", getAtkAttributeSetAsString(element->platformUIElement().get(), ObjectAttributeType));
</ins><span class="cx"> 
</span><span class="cx">     return builder.toString();
</span><span class="cx"> }
</span><span class="lines">@@ -667,12 +625,8 @@
</span><span class="cx"> static JSRetainPtr<JSStringRef> createStringWithAttributes(const Vector<RefPtr<AccessibilityUIElement> >& elements)
</span><span class="cx"> {
</span><span class="cx">     StringBuilder builder;
</span><del>-
-    for (Vector<RefPtr<AccessibilityUIElement> >::const_iterator it = elements.begin(); it != elements.end(); ++it) {
-        builder.append(attributesOfElement(const_cast<AccessibilityUIElement*>(it->get())));
-        builder.appendLiteral("\n------------\n");
-    }
-
</del><ins>+    for (auto& element : elements)
+        builder.append(attributesOfElement(const_cast<AccessibilityUIElement*>(element.get())), "\n------------\n");
</ins><span class="cx">     return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1721,8 +1675,7 @@
</span><span class="cx">     StringBuilder builder;
</span><span class="cx"> 
</span><span class="cx">     // The default text attributes apply to the entire element.
</span><del>-    builder.appendLiteral("\n\tDefault text attributes:\n\t\t");
-    builder.append(attributeSetToString(getAttributeSet(m_element.get(), TextAttributeType), "\n\t\t"));
</del><ins>+    builder.append("\n\tDefault text attributes:\n\t\t", attributeSetToString(getAttributeSet(m_element.get(), TextAttributeType), "\n\t\t"));
</ins><span class="cx"> 
</span><span class="cx">     // The attribute run provides attributes specific to the range of text at the specified offset.
</span><span class="cx">     AtkText* text = ATK_TEXT(m_element.get());
</span><span class="lines">@@ -1730,10 +1683,7 @@
</span><span class="cx">     for (unsigned i = location; i < location + length; i = end) {
</span><span class="cx">         AtkAttributeSet* attributeSet = atk_text_get_run_attributes(text, i, &start, &end);
</span><span class="cx">         GUniquePtr<gchar> substring(replaceCharactersForResults(atk_text_get_text(text, start, end)));
</span><del>-        builder.appendLiteral("\n\tRange attributes for '");
-        builder.append(substring.get());
-        builder.appendLiteral("':\n\t\t");
-        builder.append(attributeSetToString(attributeSet, "\n\t\t"));
</del><ins>+        builder.append("\n\tRange attributes for '", substring.get(), "':\n\t\t", attributeSetToString(attributeSet, "\n\t\t"));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
</span><span class="lines">@@ -2304,11 +2254,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     builder.append(atk_text_get_string_at_offset(ATK_TEXT(element.get()), offset, granularity, &startOffset, &endOffset));
</span><ins>+    builder.append(", ", startOffset, ", ", endOffset);
</ins><span class="cx"> 
</span><del>-    builder.appendLiteral(", ");
-    builder.appendNumber(startOffset);
-    builder.appendLiteral(", ");
-    builder.appendNumber(endOffset);
</del><span class="cx">     return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>