Title: [241686] releases/WebKitGTK/webkit-2.24
Revision
241686
Author
carlo...@webkit.org
Date
2019-02-18 08:14:27 -0800 (Mon, 18 Feb 2019)

Log Message

Merge r241587 - Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)
https://bugs.webkit.org/show_bug.cgi?id=194487

Reviewed by Daniel Bates.

Source/WebCore:

* accessibility/win/AccessibilityObjectWrapperWin.cpp:
(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Use makeString
instead of String::format.

* page/linux/ResourceUsageOverlayLinux.cpp:
(WebCore::formatByteNumber): Use String::number instead of String::format.

* platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
(WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
Use makeString instead of String::format.
* platform/glib/UserAgentGLib.cpp:
(WebCore::platformVersionForUAString): Ditto.
* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::simpleBusMessageCallback): Ditto.
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ditto.
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline): Ditto.
(WebCore::AppendPipeline::handleStateChangeMessage): Ditto.
(WebCore::AppendPipeline::resetParserState): Ditto.
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::load): Ditto.
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek): Ditto.

* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage): Use String::number instead of String::format.

* platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
(WebCore::GStreamerAudioCaptureSource::create): Use makeString instead of
String::format.
* platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:
(WebCore::GStreamerCaptureDeviceManager::addDevice): Ditto.
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(WebCore::webkitMediaStreamSrcAddPad): Ditto.
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
(WebCore::GStreamerVideoCaptureSource::create): Ditto.
* platform/network/curl/CookieJarDB.cpp:
(WebCore::CookieJarDB::verifySchemaVersion): Ditto.
* platform/win/SearchPopupMenuDB.cpp:
(WebCore::SearchPopupMenuDB::verifySchemaVersion): Ditto.

Source/WebKit:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::switchToNewTestingSession): Use makeString instead of String::format.
* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::buildAcceptLanguages): Ditto.
* UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::performURLImport): Ditto.
* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::logConfirmCompositionForTesting): Ditto.
(WebKit::InputMethodFilter::logSetPreeditForTesting): Ditto.

Source/WebKitLegacy/win:

* WebView.cpp:
(webKitVersionString): Use makeString instead of String::format.

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(applicationId): Use makeString instead of String::format.
(main): Ditto.
* TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
(TestWebKitAPI::Util::createURLForResource): Ditto.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks): Ditto.

* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::attributeSetToString): Use StringBuilder functions directly instead of g_strconcat.
(WTR::attributesOfElement): Use StringBuilder functions directly instead of String::format.
(WTR::createStringWithAttributes): Use appendLiteral.
(WTR::AccessibilityUIElement::helpText const): Ditto.
(WTR::AccessibilityUIElement::attributedStringForRange): Use StringBuilder functions
directly instead of using String::format.
(WTR::AccessibilityUIElement::url): Use makeString instead of String::format.
(WTR::stringAtOffset): Use StringBuilder::appendNumber instead of String::format.

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog	2019-02-18 16:14:27 UTC (rev 241686)
@@ -1,3 +1,51 @@
+2019-02-10  Darin Adler  <da...@apple.com>
+
+        Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)
+        https://bugs.webkit.org/show_bug.cgi?id=194487
+
+        Reviewed by Daniel Bates.
+
+        * accessibility/win/AccessibilityObjectWrapperWin.cpp:
+        (WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue): Use makeString
+        instead of String::format.
+
+        * page/linux/ResourceUsageOverlayLinux.cpp:
+        (WebCore::formatByteNumber): Use String::number instead of String::format.
+
+        * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
+        (WebCore::AudioSourceProviderGStreamer::AudioSourceProviderGStreamer):
+        Use makeString instead of String::format.
+        * platform/glib/UserAgentGLib.cpp:
+        (WebCore::platformVersionForUAString): Ditto.
+        * platform/graphics/gstreamer/GStreamerCommon.cpp:
+        (WebCore::simpleBusMessageCallback): Ditto.
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ditto.
+        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
+        (WebCore::AppendPipeline::AppendPipeline): Ditto.
+        (WebCore::AppendPipeline::handleStateChangeMessage): Ditto.
+        (WebCore::AppendPipeline::resetParserState): Ditto.
+        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerMSE::load): Ditto.
+        (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek): Ditto.
+
+        * platform/graphics/gtk/ImageBufferGtk.cpp:
+        (WebCore::encodeImage): Use String::number instead of String::format.
+
+        * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
+        (WebCore::GStreamerAudioCaptureSource::create): Use makeString instead of
+        String::format.
+        * platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:
+        (WebCore::GStreamerCaptureDeviceManager::addDevice): Ditto.
+        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
+        (WebCore::webkitMediaStreamSrcAddPad): Ditto.
+        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
+        (WebCore::GStreamerVideoCaptureSource::create): Ditto.
+        * platform/network/curl/CookieJarDB.cpp:
+        (WebCore::CookieJarDB::verifySchemaVersion): Ditto.
+        * platform/win/SearchPopupMenuDB.cpp:
+        (WebCore::SearchPopupMenuDB::verifySchemaVersion): Ditto.
+
 2019-02-15  Philippe Normand  <pnorm...@igalia.com>
 
         [GStreamer] Decoding media-capabilities configuration initial support

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/accessibility/win/AccessibilityObjectWrapperWin.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/accessibility/win/AccessibilityObjectWrapperWin.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/accessibility/win/AccessibilityObjectWrapperWin.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -33,6 +33,7 @@
 #include "BString.h"
 #include "HTMLNames.h"
 #include "QualifiedName.h"
+#include <wtf/text/StringConcatenateNumbers.h>
 
 namespace WebCore {
 
@@ -72,7 +73,7 @@
         ASSERT(V_VT(result) == VT_EMPTY);
         V_VT(result) = VT_BSTR;
         PlainTextRange textRange = m_object->selectedTextRange();
-        String range = String::format("{%u, %u}", textRange.start, textRange.length);
+        String range = makeString('{', textRange.start, ", ", textRange.length, '}');
         V_BSTR(result) = WebCore::BString(range).release();
         return;
     }

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -56,7 +56,7 @@
         return String::format("%.2f MB", static_cast<double>(number) / 1048576);
     if (number >= 1024)
         return String::format("%.1f kB", static_cast<double>(number) / 1024);
-    return String::format("%lu", number);
+    return String::number(number);
 }
 
 static String gcTimerString(MonotonicTime timerFireDate, MonotonicTime now)

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -109,7 +109,7 @@
 {
     m_frontLeftAdapter = gst_adapter_new();
     m_frontRightAdapter = gst_adapter_new();
-    auto pipelineName = String::format("WebAudioProvider_MediaStreamTrack_%s", source.id().utf8().data());
+    auto pipelineName = makeString("WebAudioProvider_MediaStreamTrack_", source.id());
     m_pipeline = adoptGRef(GST_ELEMENT(g_object_ref_sink(gst_element_factory_make("pipeline", pipelineName.utf8().data()))));
     auto src = ""
     webkitMediaStreamSrcAddTrack(WEBKIT_MEDIA_STREAM_SRC(src), &source, true);

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/glib/UserAgentGLib.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/glib/UserAgentGLib.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/glib/UserAgentGLib.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -58,7 +58,7 @@
 #if OS(UNIX)
     struct utsname name;
     uname(&name);
-    static NeverDestroyed<const String> uaOSVersion(String::format("%s %s", name.sysname, name.machine));
+    static NeverDestroyed<const String> uaOSVersion(makeString(name.sysname, ' ', name.machine));
     return uaOSVersion;
 #else
     // We will always claim to be Safari in Intel Mac OS X, since Safari without

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -308,7 +308,7 @@
     case GST_MESSAGE_ERROR:
         GST_ERROR_OBJECT(pipeline, "Got message: %" GST_PTR_FORMAT, message);
         {
-            WTF::String dotFileName = String::format("%s_error", GST_OBJECT_NAME(pipeline));
+            WTF::String dotFileName = makeString(GST_OBJECT_NAME(pipeline), "_error");
             GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(pipeline, GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.utf8().data());
         }
         break;
@@ -322,9 +322,9 @@
                 gst_element_state_get_name(newState),
                 gst_element_state_get_name(pending));
 
-            WTF::String dotFileName = String::format("%s_%s_%s",
-                GST_OBJECT_NAME(pipeline),
-                gst_element_state_get_name(oldState),
+            WTF::String dotFileName = makeString(
+                GST_OBJECT_NAME(pipeline), '_',
+                gst_element_state_get_name(oldState), '_',
                 gst_element_state_get_name(newState));
 
             GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(pipeline), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.utf8().data());

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -1250,8 +1250,8 @@
         // Construct a filename for the graphviz dot file output.
         GstState newState;
         gst_message_parse_state_changed(message, &currentState, &newState, nullptr);
-        CString dotFileName = String::format("%s.%s_%s", GST_OBJECT_NAME(m_pipeline.get()),
-            gst_element_state_get_name(currentState), gst_element_state_get_name(newState)).utf8();
+        CString dotFileName = makeString(GST_OBJECT_NAME(m_pipeline.get()), '.',
+            gst_element_state_get_name(currentState), '_', gst_element_state_get_name(newState)).utf8();
         GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_pipeline.get()), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data());
 
         break;

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -42,6 +42,7 @@
 #include <wtf/Condition.h>
 #include <wtf/glib/GLibUtilities.h>
 #include <wtf/glib/RunLoopSourcePriority.h>
+#include <wtf/text/StringConcatenateNumbers.h>
 
 GST_DEBUG_CATEGORY_EXTERN(webkit_mse_debug);
 #define GST_CAT_DEFAULT webkit_mse_debug
@@ -114,8 +115,8 @@
     // FIXME: give a name to the pipeline, maybe related with the track it's managing.
     // The track name is still unknown at this time, though.
     static size_t appendPipelineCount = 0;
-    String pipelineName = String::format("append-pipeline-%s-%zu",
-        m_sourceBufferPrivate->type().containerType().replace("/", "-").utf8().data(), appendPipelineCount++);
+    String pipelineName = makeString("append-pipeline-",
+        m_sourceBufferPrivate->type().containerType().replace("/", "-"), '-', appendPipelineCount++);
     m_pipeline = gst_pipeline_new(pipelineName.utf8().data());
 
     m_bus = adoptGRef(gst_pipeline_get_bus(GST_PIPELINE(m_pipeline.get())));
@@ -332,9 +333,9 @@
         CString sourceBufferType = String(m_sourceBufferPrivate->type().raw())
             .replace("/", "_").replace(" ", "_")
             .replace("\"", "").replace("\'", "").utf8();
-        CString dotFileName = String::format("webkit-append-%s-%s_%s",
-            sourceBufferType.data(),
-            gst_element_state_get_name(currentState),
+        CString dotFileName = makeString("webkit-append-",
+            sourceBufferType.data(), '-',
+            gst_element_state_get_name(currentState), '_',
             gst_element_state_get_name(newState)).utf8();
         GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(GST_BIN(m_pipeline.get()), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.data());
     }
@@ -550,7 +551,7 @@
     {
         static unsigned i = 0;
         // This is here for debugging purposes. It does not make sense to have it as class member.
-        WTF::String dotFileName = String::format("reset-pipeline-%d", ++i);
+        WTF::String dotFileName = makeString("reset-pipeline-", ++i);
         gst_debug_bin_to_dot_file(GST_BIN(m_pipeline.get()), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.utf8().data());
     }
 #endif

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -127,7 +127,7 @@
 void MediaPlayerPrivateGStreamerMSE::load(const String& url, MediaSourcePrivateClient* mediaSource)
 {
     m_mediaSource = mediaSource;
-    load(String::format("mediasource%s", url.utf8().data()));
+    load(makeString("mediasource", url));
 }
 
 void MediaPlayerPrivateGStreamerMSE::pause()
@@ -250,8 +250,8 @@
         || !m_gstSeekCompleted) {
         CString reason = "Unknown reason";
         if (getStateResult == GST_STATE_CHANGE_ASYNC) {
-            reason = String::format("In async change %s --> %s",
-                gst_element_state_get_name(state),
+            reason = makeString("In async change ",
+                gst_element_state_get_name(state), " --> ",
                 gst_element_state_get_name(newState)).utf8();
         } else if (state < GST_STATE_PAUSED)
             reason = "State less than PAUSED";

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gtk/ImageBufferGtk.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gtk/ImageBufferGtk.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/graphics/gtk/ImageBufferGtk.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -67,7 +67,7 @@
 
     GUniqueOutPtr<GError> error;
     if (type == "jpeg" && quality && *quality >= 0.0 && *quality <= 1.0) {
-        String qualityString = String::format("%d", static_cast<int>(*quality * 100.0 + 0.5));
+        String qualityString = String::number(static_cast<int>(*quality * 100.0 + 0.5));
         gdk_pixbuf_save_to_buffer(pixbuf.get(), &buffer.outPtr(), &bufferSize, type.utf8().data(), &error.outPtr(), "quality", qualityString.utf8().data(), NULL);
     } else
         gdk_pixbuf_save_to_buffer(pixbuf.get(), &buffer.outPtr(), &bufferSize, type.utf8().data(), &error.outPtr(), NULL);

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -71,7 +71,7 @@
 {
     auto device = GStreamerAudioCaptureDeviceManager::singleton().gstreamerDeviceWithUID(deviceID);
     if (!device) {
-        auto errorMessage = String::format("GStreamerAudioCaptureSource::create(): GStreamer did not find the device: %s.", deviceID.utf8().data());
+        auto errorMessage = makeString("GStreamerAudioCaptureSource::create(): GStreamer did not find the device: ", deviceID, '.');
         return CaptureSourceOrError(WTFMove(errorMessage));
     }
 

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -108,7 +108,7 @@
     gboolean isDefault = FALSE;
     gst_structure_get_boolean(properties.get(), "is-default", &isDefault);
 
-    String identifier = String::format("%s%s", isDefault ? "default: " : "", deviceName.get());
+    String identifier = makeString(isDefault ? "default: " : "", deviceName.get());
 
     auto gstCaptureDevice = GStreamerCaptureDevice(WTFMove(device), identifier, type, identifier);
     gstCaptureDevice.setEnabled(true);

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -382,7 +382,7 @@
 
 static void webkitMediaStreamSrcAddPad(WebKitMediaStreamSrc* self, GstPad* target, GstStaticPadTemplate* pad_template)
 {
-    auto padname = String::format("src_%u", g_atomic_int_add(&(self->npads), 1));
+    auto padname = makeString("src_", g_atomic_int_add(&(self->npads), 1));
     auto ghostpad = gst_ghost_pad_new_from_template(padname.utf8().data(), target,
         gst_static_pad_template_get(pad_template));
 

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -102,7 +102,7 @@
 {
     auto device = GStreamerVideoCaptureDeviceManager::singleton().gstreamerDeviceWithUID(deviceID);
     if (!device) {
-        auto errorMessage = String::format("GStreamerVideoCaptureSource::create(): GStreamer did not find the device: %s.", deviceID.utf8().data());
+        auto errorMessage = makeString("GStreamerVideoCaptureSource::create(): GStreamer did not find the device: ", deviceID, '.');
         return CaptureSourceOrError(WTFMove(errorMessage));
     }
 

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/network/curl/CookieJarDB.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/network/curl/CookieJarDB.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/network/curl/CookieJarDB.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -31,6 +31,7 @@
 #include <wtf/FileSystem.h>
 #include <wtf/MonotonicTime.h>
 #include <wtf/URL.h>
+#include <wtf/text/StringConcatenateNumbers.h>
 
 #if ENABLE(PUBLIC_SUFFIX_LIST)
 #include "PublicSuffix.h"
@@ -202,7 +203,7 @@
     }
 
     // Update version
-    executeSql(String::format("PRAGMA user_version=%d", schemaVersion));
+    executeSql(makeString("PRAGMA user_version=", schemaVersion));
 }
 
 void CookieJarDB::deleteAllTables()

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/win/SearchPopupMenuDB.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/win/SearchPopupMenuDB.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/platform/win/SearchPopupMenuDB.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -28,6 +28,7 @@
 #include "SQLiteFileSystem.h"
 #include "SQLiteTransaction.h"
 #include <wtf/FileSystem.h>
+#include <wtf/text/StringConcatenateNumbers.h>
 
 namespace WebCore {
 
@@ -250,7 +251,7 @@
     }
 
     // Update version
-    executeSimpleSql(String::format("PRAGMA user_version=%d", schemaVersion));
+    executeSimpleSql(makeString("PRAGMA user_version=", schemaVersion));
 }
 
 void SearchPopupMenuDB::checkSQLiteReturnCode(int actual)

Modified: releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKit/ChangeLog	2019-02-18 16:14:27 UTC (rev 241686)
@@ -1,3 +1,20 @@
+2019-02-10  Darin Adler  <da...@apple.com>
+
+        Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)
+        https://bugs.webkit.org/show_bug.cgi?id=194487
+
+        Reviewed by Daniel Bates.
+
+        * NetworkProcess/NetworkProcess.cpp:
+        (WebKit::NetworkProcess::switchToNewTestingSession): Use makeString instead of String::format.
+        * NetworkProcess/soup/NetworkProcessSoup.cpp:
+        (WebKit::buildAcceptLanguages): Ditto.
+        * UIProcess/API/glib/IconDatabase.cpp:
+        (WebKit::IconDatabase::performURLImport): Ditto.
+        * UIProcess/gtk/InputMethodFilter.cpp:
+        (WebKit::InputMethodFilter::logConfirmCompositionForTesting): Ditto.
+        (WebKit::InputMethodFilter::logSetPreeditForTesting): Ditto.
+
 2019-02-14  Brent Fulgham  <bfulg...@apple.com>
 
         REGRESSION (r240446): Storage Access API does not handle domains consistently

Modified: releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/NetworkProcess.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/NetworkProcess.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -463,7 +463,7 @@
 {
 #if PLATFORM(COCOA)
     // Session name should be short enough for shared memory region name to be under the limit, otherwise sandbox rules won't work (see <rdar://problem/13642852>).
-    String sessionName = String::format("WebKit Test-%u", static_cast<uint32_t>(getCurrentProcessID()));
+    String sessionName = makeString("WebKit Test-", getCurrentProcessID());
 
     auto session = adoptCF(WebCore::createPrivateStorageSession(sessionName.createCFString().get()));
 

Modified: releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -82,9 +82,10 @@
 
         int quality = 100 - i * delta;
         if (quality > 0 && quality < 100) {
+            builder.appendLiteral(";q=");
             char buffer[8];
             g_ascii_formatd(buffer, 8, "%.2f", quality / 100.0);
-            builder.append(String::format(";q=%s", buffer));
+            builder.append(buffer);
         }
     }
 

Modified: releases/WebKitGTK/webkit-2.24/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKit/UIProcess/API/glib/IconDatabase.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -38,6 +38,7 @@
 #include <wtf/NeverDestroyed.h>
 #include <wtf/StdLibExtras.h>
 #include <wtf/URL.h>
+#include <wtf/text/StringConcatenateNumbers.h>
 
 // For methods that are meant to support API from the main thread - should not be called internally
 #define ASSERT_NOT_SYNC_THREAD() ASSERT(!m_syncThreadRunning || !IS_ICON_SYNC_THREAD())
@@ -1083,7 +1084,7 @@
     // Note that IconInfo.stamp is only set when the icon data is retrieved from the server (and thus is not updated whether
     // we use it or not). This code works anyway because the IconDatabase downloads icons again if they are older than 4 days,
     // so if the timestamp goes back in time more than those 30 days we can be sure that the icon was not used at all.
-    String importQuery = String::format("SELECT PageURL.url, IconInfo.url, IconInfo.stamp FROM PageURL INNER JOIN IconInfo ON PageURL.iconID=IconInfo.iconID WHERE IconInfo.stamp > %.0f;", floor((WallTime::now() - notUsedIconExpirationTime).secondsSinceEpoch().seconds()));
+    String importQuery = makeString("SELECT PageURL.url, IconInfo.url, IconInfo.stamp FROM PageURL INNER JOIN IconInfo ON PageURL.iconID=IconInfo.iconID WHERE IconInfo.stamp > ", floor((WallTime::now() - notUsedIconExpirationTime).secondsSinceEpoch().seconds()), ';');
 
     SQLiteStatement query(m_syncDB, importQuery);
 

Modified: releases/WebKitGTK/webkit-2.24/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -467,13 +467,14 @@
     if (m_confirmedComposition.isEmpty())
         m_events.append(String("confirmCurrentcomposition"));
     else
-        m_events.append(String::format("confirmComposition '%s'", m_confirmedComposition.utf8().data()));
+        m_events.append(makeString("confirmComposition '", m_confirmedComposition, '\''));
 }
 
 void InputMethodFilter::logSetPreeditForTesting()
 {
-    m_events.append(String::format("setPreedit text='%s' cursorOffset=%i", m_preedit.utf8().data(), m_cursorOffset));
+    m_events.append(makeString("setPreedit text='", m_preedit, "' cursorOffset=", m_cursorOffset));
 }
+
 #endif // ENABLE(API_TESTS)
 
 } // namespace WebKit

Modified: releases/WebKitGTK/webkit-2.24/Source/WebKitLegacy/win/ChangeLog (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebKitLegacy/win/ChangeLog	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKitLegacy/win/ChangeLog	2019-02-18 16:14:27 UTC (rev 241686)
@@ -1,3 +1,13 @@
+2019-02-10  Darin Adler  <da...@apple.com>
+
+        Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)
+        https://bugs.webkit.org/show_bug.cgi?id=194487
+
+        Reviewed by Daniel Bates.
+
+        * WebView.cpp:
+        (webKitVersionString): Use makeString instead of String::format.
+
 2019-02-06  Daniel Bates  <daba...@apple.com>
 
         Standardize on ControlKey instead of CtrlKey

Modified: releases/WebKitGTK/webkit-2.24/Source/WebKitLegacy/win/WebView.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Source/WebKitLegacy/win/WebView.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Source/WebKitLegacy/win/WebView.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -2874,7 +2874,7 @@
     if (::LoadStringW(gInstance, BUILD_NUMBER, reinterpret_cast<LPWSTR>(&buildNumberStringPtr), 0) && buildNumberStringPtr)
         return buildNumberStringPtr;
 #endif
-    return String::format("%d.%d", WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION);
+    return makeString(WEBKIT_MAJOR_VERSION, '.', WEBKIT_MINOR_VERSION);
 }
 
 const String& WebView::userAgentForKURL(const URL&)

Modified: releases/WebKitGTK/webkit-2.24/Tools/ChangeLog (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Tools/ChangeLog	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Tools/ChangeLog	2019-02-18 16:14:27 UTC (rev 241686)
@@ -1,3 +1,28 @@
+2019-02-10  Darin Adler  <da...@apple.com>
+
+        Replace more uses of String::format with StringConcatenate (mostly non-Apple platform-specific cases)
+        https://bugs.webkit.org/show_bug.cgi?id=194487
+
+        Reviewed by Daniel Bates.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (applicationId): Use makeString instead of String::format.
+        (main): Ditto.
+        * TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
+        (TestWebKitAPI::Util::createURLForResource): Ditto.
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
+        (WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks): Ditto.
+
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::attributeSetToString): Use StringBuilder functions directly instead of g_strconcat.
+        (WTR::attributesOfElement): Use StringBuilder functions directly instead of String::format.
+        (WTR::createStringWithAttributes): Use appendLiteral.
+        (WTR::AccessibilityUIElement::helpText const): Ditto.
+        (WTR::AccessibilityUIElement::attributedStringForRange): Use StringBuilder functions
+        directly instead of using String::format.
+        (WTR::AccessibilityUIElement::url): Use makeString instead of String::format.
+        (WTR::stringAtOffset): Use StringBuilder::appendNumber instead of String::format.
+
 2019-02-15  Saam barati  <sbar...@apple.com>
 
         [WebAssembly] Write a new register allocator for Air O0 and make BBQ use it

Modified: releases/WebKitGTK/webkit-2.24/Tools/DumpRenderTree/win/DumpRenderTree.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Tools/DumpRenderTree/win/DumpRenderTree.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -65,6 +65,7 @@
 #include <wtf/RetainPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenateNumbers.h>
 #include <wtf/text/StringHash.h>
 
 #if USE(CFURLCONNECTION)
@@ -904,8 +905,7 @@
 
 static String applicationId()
 {
-    DWORD processId = ::GetCurrentProcessId();
-    return String::format("com.apple.DumpRenderTree.%d", processId);
+    return makeString("com.apple.DumpRenderTree.", ::GetCurrentProcessId());
 }
 
 static void setApplicationId()
@@ -1537,8 +1537,8 @@
     // Tests involving the clipboard are flaky when running with multiple DRTs, since the clipboard is global.
     // We can fix this by assigning each DRT a separate window station (each window station has its own clipboard).
     DWORD processId = ::GetCurrentProcessId();
-    String windowStationName = String::format("windowStation%d", processId);
-    String desktopName = String::format("desktop%d", processId);
+    String windowStationName = makeString("windowStation", processId);
+    String desktopName = makeString("desktop", processId);
     HDESK desktop = nullptr;
 
     auto windowsStation = ::CreateWindowStation(windowStationName.charactersWithNullTermination().data(), CWF_CREATE_ONLY, WINSTA_ALL_ACCESS, nullptr);

Modified: releases/WebKitGTK/webkit-2.24/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -51,7 +51,7 @@
 
 WKURLRef createURLForResource(const char* resource, const char* extension)
 {
-    String filename = String::format("..\\..\\..\\Tools\\TestWebKitAPI\\Tests\\WebKit\\%s.%s", resource, extension);
+    String filename = makeString("..\\..\\..\\Tools\\TestWebKitAPI\\Tests\\WebKit\\", resource, '.', extension);
     auto url = "" filename));
     return WKURLCreateWithUTF8CString(url.string().utf8().data());
 }

Modified: releases/WebKitGTK/webkit-2.24/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -267,7 +267,7 @@
     for (const char** signalName = signalNames; *signalName; signalName++) {
         unsigned id = atk_add_global_event_listener(axObjectEventListener, *signalName);
         if (!id) {
-            String message = String::format("atk_add_global_event_listener failed for signal %s\n", *signalName);
+            String message = makeString("atk_add_global_event_listener failed for signal ", *signalName, '\n');
             InjectedBundle::singleton().outputText(message);
             continue;
         }

Modified: releases/WebKitGTK/webkit-2.24/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp (241685 => 241686)


--- releases/WebKitGTK/webkit-2.24/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2019-02-18 16:14:06 UTC (rev 241685)
+++ releases/WebKitGTK/webkit-2.24/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp	2019-02-18 16:14:27 UTC (rev 241686)
@@ -44,7 +44,6 @@
 #include <wtf/glib/GUniquePtr.h>
 #include <wtf/text/CString.h>
 #include <wtf/text/StringBuilder.h>
-#include <wtf/text/WTFString.h>
 #include <wtf/unicode/CharacterNames.h>
 
 namespace WTR {
@@ -226,8 +225,9 @@
     StringBuilder builder;
     for (AtkAttributeSet* attributes = attributeSet; attributes; attributes = attributes->next) {
         AtkAttribute* attribute = static_cast<AtkAttribute*>(attributes->data);
-        GUniquePtr<gchar> attributeData(g_strconcat(attribute->name, ":", attribute->value, NULL));
-        builder.append(attributeData.get());
+        builder.append(attribute->name);
+        builder.append(':');
+        builder.append(attribute->value);
         if (attributes->next)
             builder.append(separator);
     }
@@ -605,53 +605,102 @@
 {
     StringBuilder builder;
 
-    builder.append(String::format("%s\n", element->role()->string().utf8().data()));
+    builder.append(element->role()->string());
+    builder.append('\n');
 
     // For the parent we print its role and its name, if available.
-    builder.append("AXParent: ");
+    builder.appendLiteral("AXParent: ");
     RefPtr<AccessibilityUIElement> parent = element->parentElement();
     AtkObject* atkParent = parent ? parent->platformUIElement().get() : nullptr;
     if (atkParent) {
         builder.append(roleToString(atkParent));
         const char* parentName = atk_object_get_name(atkParent);
-        if (parentName && g_utf8_strlen(parentName, -1))
-            builder.append(String::format(": %s", parentName));
+        if (parentName && parentName[0]) {
+            builder.appendLiteral(": ");
+            builder.append(parentName);
+        }
     } else
-        builder.append("(null)");
-    builder.append("\n");
+        builder.appendLiteral("(null)");
+    builder.append('\n');
 
-    builder.append(String::format("AXChildren: %d\n", element->childrenCount()));
-    builder.append(String::format("AXPosition: { %f, %f }\n", element->x(), element->y()));
-    builder.append(String::format("AXSize: { %f, %f }\n", element->width(), element->height()));
+    builder.appendLiteral("AXChildren: ");
+    builder.appendNumber(element->childrenCount());
+    builder.append('\n');
 
+    builder.appendLiteral("AXPosition:  { ");
+    builder.appendNumber(element->x(), 6, KeepTrailingZeros);
+    builder.appendLiteral(", ");
+    builder.appendNumber(element->y(), 6, KeepTrailingZeros);
+    builder.appendLiteral(" }\n");
+
+    builder.appendLiteral("AXSize: { ");
+    builder.appendNumber(element->width(), 6, KeepTrailingZeros);
+    builder.appendLiteral(", ");
+    builder.appendNumber(element->height(), 6, KeepTrailingZeros);
+    builder.appendLiteral(" }\n");
+
     String title = element->title()->string();
-    if (!title.isEmpty())
-        builder.append(String::format("%s\n", title.utf8().data()));
+    if (!title.isEmpty()) {
+        builder.append(title);
+        builder.append('\n');
+    }
 
     String description = element->description()->string();
-    if (!description.isEmpty())
-        builder.append(String::format("%s\n", description.utf8().data()));
+    if (!description.isEmpty()) {
+        builder.append(description.utf8().data());
+        builder.append('\n');
+    }
 
     String value = element->stringValue()->string();
-    if (!value.isEmpty())
-        builder.append(String::format("%s\n", value.utf8().data()));
+    if (!value.isEmpty()) {
+        builder.append(value);
+        builder.append('\n');
+    }
 
-    builder.append(String::format("AXFocusable: %d\n", element->isFocusable()));
-    builder.append(String::format("AXFocused: %d\n", element->isFocused()));
-    builder.append(String::format("AXSelectable: %d\n", element->isSelectable()));
-    builder.append(String::format("AXSelected: %d\n", element->isSelected()));
-    builder.append(String::format("AXMultiSelectable: %d\n", element->isMultiSelectable()));
-    builder.append(String::format("AXEnabled: %d\n", element->isEnabled()));
-    builder.append(String::format("AXExpanded: %d\n", element->isExpanded()));
-    builder.append(String::format("AXRequired: %d\n", element->isRequired()));
-    builder.append(String::format("AXChecked: %d\n", element->isChecked()));
+    builder.appendLiteral("AXFocusable: ");
+    builder.appendNumber(element->isFocusable());
+    builder.append('\n');
 
+    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');
+
     String url = ""
-    if (!url.isEmpty())
-        builder.append(String::format("%s\n", url.utf8().data()));
+    if (!url.isEmpty()) {
+        builder.append(url);
+        builder.append('\n');
+    }
 
     // We append the ATK specific attributes as a single line at the end.
-    builder.append("AXPlatformAttributes: ");
+    builder.appendLiteral("AXPlatformAttributes: ");
     builder.append(getAtkAttributeSetAsString(element->platformUIElement().get(), ObjectAttributeType));
 
     return builder.toString();
@@ -663,7 +712,7 @@
 
     for (Vector<RefPtr<AccessibilityUIElement> >::const_iterator it = elements.begin(); it != elements.end(); ++it) {
         builder.append(attributesOfElement(const_cast<AccessibilityUIElement*>(it->get())));
-        builder.append("\n------------\n");
+        builder.appendLiteral("\n------------\n");
     }
 
     return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
@@ -1445,13 +1494,13 @@
         return JSStringCreateWithCharacters(0, 0);
 
     StringBuilder builder;
-    builder.append("AXHelp: ");
+    builder.appendLiteral("AXHelp: ");
 
     for (guint targetCount = 0; targetCount < targetList->len; targetCount++) {
         if (AtkObject* target = static_cast<AtkObject*>(g_ptr_array_index(targetList, targetCount))) {
             GUniquePtr<gchar> text(atk_text_get_text(ATK_TEXT(target), 0, -1));
             if (targetCount)
-                builder.append(" ");
+                builder.append(' ');
             builder.append(text.get());
         }
     }
@@ -1783,7 +1832,7 @@
     StringBuilder builder;
 
     // The default text attributes apply to the entire element.
-    builder.append("\n\tDefault text attributes:\n\t\t");
+    builder.appendLiteral("\n\tDefault text attributes:\n\t\t");
     builder.append(attributeSetToString(getAttributeSet(m_element.get(), TextAttributeType), "\n\t\t"));
 
     // The attribute run provides attributes specific to the range of text at the specified offset.
@@ -1792,7 +1841,9 @@
     for (unsigned i = location; i < location + length; i = end) {
         AtkAttributeSet* attributeSet = atk_text_get_run_attributes(text, i, &start, &end);
         GUniquePtr<gchar> substring(replaceCharactersForResults(atk_text_get_text(text, start, end)));
-        builder.append(String::format("\n\tRange attributes for '%s':\n\t\t", substring.get()));
+        builder.appendLiteral("\n\tRange attributes for '");
+        builder.append(substring.get());
+        builder.appendLiteral("':\n\t\t");
         builder.append(attributeSetToString(attributeSet, "\n\t\t"));
     }
 
@@ -2044,7 +2095,7 @@
 
     // Build the result string, stripping the absolute URL paths if present.
     char* localURI = g_strstr_len(hyperlinkURI.get(), -1, "LayoutTests");
-    String axURL = String::format("AXURL: %s", localURI ? localURI : hyperlinkURI.get());
+    String axURL = makeString("AXURL: ", localURI ? localURI : hyperlinkURI.get());
     return JSStringCreateWithUTF8CString(axURL.utf8().data());
 }
 
@@ -2352,7 +2403,10 @@
 #else
     builder.append(atk_text_get_text_at_offset(ATK_TEXT(element.get()), offset, boundary, &startOffset, &endOffset));
 #endif
-    builder.append(String::format(", %i, %i", startOffset, endOffset));
+    builder.appendLiteral(", ");
+    builder.appendNumber(startOffset);
+    builder.appendLiteral(", ");
+    builder.appendNumber(endOffset);
     return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to