[WTF] Rename String::format to String::deprecatedFormat
authortpopela@redhat.com <tpopela@redhat.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Aug 2018 02:11:46 +0000 (02:11 +0000)
committertpopela@redhat.com <tpopela@redhat.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Aug 2018 02:11:46 +0000 (02:11 +0000)
https://bugs.webkit.org/show_bug.cgi?id=188191

Reviewed by Darin Adler.

It should be replaced with string concatenation.

Source/JavaScriptCore:

* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::nameForRegister):
* inspector/InjectedScriptBase.cpp:
(Inspector::InjectedScriptBase::makeCall):
* inspector/InspectorBackendDispatcher.cpp:
(Inspector::BackendDispatcher::getPropertyValue):
* inspector/agents/InspectorConsoleAgent.cpp:
(Inspector::InspectorConsoleAgent::enable):
(Inspector::InspectorConsoleAgent::stopTiming):
* jsc.cpp:
(FunctionJSCStackFunctor::operator() const):
* parser/Lexer.cpp:
(JSC::Lexer<T>::invalidCharacterMessage const):
* runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
* runtime/IntlObject.cpp:
(JSC::canonicalizeLocaleList):
* runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lex):
(JSC::LiteralParser<CharType>::Lexer::lexStringSlow):
(JSC::LiteralParser<CharType>::parse):
* runtime/LiteralParser.h:
(JSC::LiteralParser::getErrorMessage):

Source/WebCore:

* Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString const):
* Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
* Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::loggingString const):
* Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
(WebCore::IDBGetAllRecordsData::loggingString const):
* Modules/indexeddb/shared/IDBGetRecordData.cpp:
(WebCore::IDBGetRecordData::loggingString const):
* Modules/indexeddb/shared/IDBIndexInfo.cpp:
(WebCore::IDBIndexInfo::loggingString const):
(WebCore::IDBIndexInfo::condensedLoggingString const):
* Modules/indexeddb/shared/IDBIterateCursorData.cpp:
(WebCore::IDBIterateCursorData::loggingString const):
* Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::condensedLoggingString const):
* Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::loggingString const):
* Modules/webdatabase/Database.cpp:
(WebCore::formatErrorMessage):
* Modules/webdatabase/SQLError.h:
(WebCore::SQLError::create):
* Modules/websockets/WebSocket.cpp:
(WebCore::encodeProtocolString):
* accessibility/win/AccessibilityObjectWrapperWin.cpp:
(WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue):
* css/CSSUnicodeRangeValue.cpp:
(WebCore::CSSUnicodeRangeValue::customCSSText const):
* css/MediaQueryEvaluator.cpp:
(WebCore::aspectRatioValueAsString):
* css/parser/CSSParserToken.cpp:
(WebCore::CSSParserToken::serialize const):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseHexColor):
* dom/Document.cpp:
(WebCore::Document::lastModified):
* html/FTPDirectoryDocument.cpp:
(WebCore::processFilesizeString):
(WebCore::processFileDateString):
* html/HTMLMediaElement.h:
(WTF::ValueToString<WebCore::TextTrackCue::string):
* html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setLength):
* html/ImageDocument.cpp:
(WebCore::ImageDocument::imageUpdated):
* html/canvas/WebGLRenderingContextBase.cpp:
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::init):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::applyCSSProperties):
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::setDockingUnavailable):
(WebCore::InspectorFrontendClientLocal::setAttachedWindow):
(WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
(WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
(WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
* inspector/agents/InspectorCSSAgent.cpp:
* inspector/agents/InspectorIndexedDBAgent.cpp:
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS const):
* page/History.cpp:
(WebCore::History::stateObjectAdded):
* page/MemoryRelease.cpp:
(WebCore::logMemoryStatisticsAtTimeOfDeath):
* page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::formatByteNumber):
(WebCore::gcTimerString):
(WebCore::ResourceUsageOverlay::platformDraw):
* page/cocoa/ResourceUsageThreadCocoa.mm:
(WebCore::logFootprintComparison):
* page/linux/ResourceUsageOverlayLinux.cpp:
(WebCore::cpuUsageString):
(WebCore::formatByteNumber):
(WebCore::gcTimerString):
* page/scrolling/AxisScrollSnapOffsets.cpp:
(WebCore::snapOffsetsToString):
(WebCore::snapOffsetRangesToString):
(WebCore::snapPortOrAreaToString):
* platform/DateComponents.cpp:
(WebCore::DateComponents::toStringForTime const):
(WebCore::DateComponents::toString const):
* platform/LocalizedStrings.cpp:
* platform/animation/TimingFunction.cpp:
(WebCore::TimingFunction::cssText const):
* platform/audio/HRTFElevation.cpp:
(WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
* platform/cocoa/KeyEventCocoa.mm:
(WebCore::keyIdentifierForCharCode):
* platform/gamepad/mac/HIDGamepad.cpp:
(WebCore::HIDGamepad::HIDGamepad):
* platform/glib/UserAgentGLib.cpp:
(WebCore::platformVersionForUAString):
* platform/graphics/Color.cpp:
(WebCore::Color::nameForRenderTreeAsText const):
* platform/graphics/FloatPolygon.h:
(WTF::ValueToString<WebCore::FloatPolygonEdge::string):
* platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
(WebCore::AVTrackPrivateAVFObjCImpl::id const):
* platform/graphics/avfoundation/MediaSampleAVFObjC.h:
(WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setName):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
* platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::simpleBusMessageCallback):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):
(WebCore::MediaPlayerPrivateGStreamer::handleMessage):
(WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
* platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::handleStateChangeMessage):
(WebCore::AppendPipeline::resetPipeline):
* platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::load):
(WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
* platform/graphics/gtk/ImageBufferGtk.cpp:
(WebCore::encodeImage):
* platform/gtk/PlatformKeyboardEventGtk.cpp:
(WebCore::PlatformKeyboardEvent::keyIdentifierForGdkKeyCode):
* platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
(WebCore::GStreamerAudioCaptureSource::create):
* platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
(WebCore::webkitMediaStreamSrcAddPad):
* platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
(WebCore::GStreamerVideoCaptureSource::create):
* platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
(WebCore::GStreamerVideoEncoder::makeElement):
* platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::drawText):
* platform/mock/mediasource/MockSourceBufferPrivate.cpp:
* platform/network/ParsedContentRange.cpp:
(WebCore::ParsedContentRange::headerValue const):
* platform/network/cf/NetworkStorageSessionCFNet.cpp:
(WebCore::NetworkStorageSession::switchToNewTestingSession):
* platform/sql/SQLiteDatabase.cpp:
(WebCore::unauthorizedSQLFunction):
* platform/text/PlatformLocale.cpp:
(WebCore::DateTimeStringBuilder::visitField):
* platform/win/GDIObjectCounter.cpp:
(WebCore::GDIObjectCounter::GDIObjectCounter):
* platform/win/KeyEventWin.cpp:
(WebCore::keyIdentifierForWindowsKeyCode):
* rendering/FloatingObjects.h:
(WTF::ValueToString<WebCore::FloatingObject::string):
* rendering/RenderFragmentedFlow.h:
(WTF::ValueToString<WebCore::RenderFragmentContainer::string):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::logLayerInfo):
* rendering/RenderTheme.cpp:
(WebCore::RenderTheme::formatMediaControlsTime const):
* testing/Internals.cpp:
(WebCore::Internals::address):
* workers/service/server/RegistrationDatabase.cpp:
(WebCore::RegistrationDatabase::ensureValidRecordsTable):
(WebCore::RegistrationDatabase::importRecords):

Source/WebCore/PAL:

* pal/FileSizeFormatter.cpp:
(fileSizeDescription):

Source/WebKit:

* NetworkProcess/soup/NetworkProcessSoup.cpp:
(WebKit::buildAcceptLanguages):
* Platform/IPC/win/ConnectionWin.cpp:
(IPC::Connection::createServerAndClientIdentifiers):
* Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::writeHeaders):
* Shared/win/WebEventFactory.cpp:
(WebKit::keyIdentifierFromEvent):
* Shared/wpe/WebEventFactory.cpp:
(WebKit::identifierStringForKeyEvent):
* UIProcess/API/APINavigation.cpp:
(API::Navigation::loggingString const):
* UIProcess/API/glib/IconDatabase.cpp:
(WebKit::IconDatabase::performURLImport):
* UIProcess/Cocoa/ViewGestureController.cpp:
(WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::loggingString const):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::loggingString):
* UIProcess/WebInspectorUtilities.cpp:
(WebKit::inspectorPageGroupIdentifierForPage):
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::processDidFinishLaunching):
(WebKit::WebProcessPool::startMemorySampler):
* UIProcess/gtk/InputMethodFilter.cpp:
(WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
(WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
(WebKit::InputMethodFilter::logConfirmCompositionForTesting):
(WebKit::InputMethodFilter::logSetPreeditForTesting):

Source/WebKitLegacy/win:

* FullscreenVideoController.cpp:
(timeToString):
* WebView.cpp:
(webKitVersionString):

Source/WTF:

* wtf/Assertions.cpp:
* wtf/JSONValues.cpp:
* wtf/WorkQueue.cpp:
(WTF::WorkQueue::concurrentApply):
* wtf/dtoa.cpp:
(WTF::dtoa):
* wtf/text/WTFString.cpp:
(WTF::String::deprecatedFormat):
(WTF::String::format): Deleted.
* wtf/text/WTFString.h:

Tools:

* DumpRenderTree/win/DumpRenderTree.cpp:
(applicationId):
(main):
* TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
(TestWebKitAPI::Util::createURLForResource):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::cacheTestRunnerCallback):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::url):
(WTR::stringAtOffset):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveAuthenticationChallenge):
(WTR::TestController::downloadDidFail):
(WTR::originUserVisibleName):
(WTR::userMediaOriginHash):
(WTR::TestController::didNavigateWithNavigationData):
(WTR::TestController::didPerformClientRedirect):
(WTR::TestController::didPerformServerRedirect):
(WTR::TestController::didUpdateHistoryTitle):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@234489 268f45cc-cd09-0410-ab3c-d52691b4dbfc

116 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/inspector/InjectedScriptBase.cpp
Source/JavaScriptCore/inspector/InspectorBackendDispatcher.cpp
Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/parser/Lexer.cpp
Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
Source/JavaScriptCore/runtime/IntlObject.cpp
Source/JavaScriptCore/runtime/LiteralParser.cpp
Source/JavaScriptCore/runtime/LiteralParser.h
Source/WTF/ChangeLog
Source/WTF/wtf/Assertions.cpp
Source/WTF/wtf/JSONValues.cpp
Source/WTF/wtf/WorkQueue.cpp
Source/WTF/wtf/dtoa.cpp
Source/WTF/wtf/text/WTFString.cpp
Source/WTF/wtf/text/WTFString.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBKeyData.cpp
Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp
Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp
Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp
Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp
Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp
Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp
Source/WebCore/Modules/webdatabase/Database.cpp
Source/WebCore/Modules/webdatabase/SQLError.h
Source/WebCore/Modules/websockets/WebSocket.cpp
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/FileSizeFormatter.cpp
Source/WebCore/accessibility/win/AccessibilityObjectWrapperWin.cpp
Source/WebCore/css/CSSUnicodeRangeValue.cpp
Source/WebCore/css/MediaQueryEvaluator.cpp
Source/WebCore/css/parser/CSSParserToken.cpp
Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/html/FTPDirectoryDocument.cpp
Source/WebCore/html/HTMLMediaElement.h
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Source/WebCore/html/parser/XSSAuditor.cpp
Source/WebCore/html/track/VTTCue.cpp
Source/WebCore/inspector/InspectorFrontendClientLocal.cpp
Source/WebCore/inspector/agents/InspectorCSSAgent.cpp
Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp
Source/WebCore/page/CaptionUserPreferencesMediaAF.cpp
Source/WebCore/page/History.cpp
Source/WebCore/page/MemoryRelease.cpp
Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm
Source/WebCore/page/cocoa/ResourceUsageThreadCocoa.mm
Source/WebCore/page/linux/ResourceUsageOverlayLinux.cpp
Source/WebCore/page/scrolling/AxisScrollSnapOffsets.cpp
Source/WebCore/platform/DateComponents.cpp
Source/WebCore/platform/LocalizedStrings.cpp
Source/WebCore/platform/animation/TimingFunction.cpp
Source/WebCore/platform/audio/HRTFElevation.cpp
Source/WebCore/platform/cocoa/KeyEventCocoa.mm
Source/WebCore/platform/gamepad/mac/HIDGamepad.cpp
Source/WebCore/platform/glib/UserAgentGLib.cpp
Source/WebCore/platform/graphics/Color.cpp
Source/WebCore/platform/graphics/FloatPolygon.h
Source/WebCore/platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm
Source/WebCore/platform/graphics/avfoundation/MediaSampleAVFObjC.h
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp
Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp
Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp
Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp
Source/WebCore/platform/graphics/gtk/ImageBufferGtk.cpp
Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp
Source/WebCore/platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp
Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp
Source/WebCore/platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp
Source/WebCore/platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp
Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp
Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp
Source/WebCore/platform/network/ParsedContentRange.cpp
Source/WebCore/platform/network/cf/NetworkStorageSessionCFNet.cpp
Source/WebCore/platform/sql/SQLiteDatabase.cpp
Source/WebCore/platform/text/PlatformLocale.cpp
Source/WebCore/platform/win/GDIObjectCounter.cpp
Source/WebCore/platform/win/KeyEventWin.cpp
Source/WebCore/rendering/FloatingObjects.h
Source/WebCore/rendering/RenderFragmentedFlow.h
Source/WebCore/rendering/RenderLayerCompositor.cpp
Source/WebCore/rendering/RenderTheme.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/workers/service/server/RegistrationDatabase.cpp
Source/WebKit/ChangeLog
Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp
Source/WebKit/Platform/IPC/win/ConnectionWin.cpp
Source/WebKit/Shared/WebMemorySampler.cpp
Source/WebKit/Shared/win/WebEventFactory.cpp
Source/WebKit/Shared/wpe/WebEventFactory.cpp
Source/WebKit/UIProcess/API/APINavigation.cpp
Source/WebKit/UIProcess/API/glib/IconDatabase.cpp
Source/WebKit/UIProcess/Cocoa/ViewGestureController.cpp
Source/WebKit/UIProcess/SuspendedPageProxy.cpp
Source/WebKit/UIProcess/WebBackForwardList.cpp
Source/WebKit/UIProcess/WebInspectorUtilities.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp
Source/WebKitLegacy/win/ChangeLog
Source/WebKitLegacy/win/FullscreenVideoController.cpp
Source/WebKitLegacy/win/WebView.cpp
Tools/ChangeLog
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/TestWebKitAPI/win/PlatformUtilitiesWin.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp
Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp
Tools/WebKitTestRunner/TestController.cpp

index 410bb8d..e430ac2 100644 (file)
@@ -1,3 +1,36 @@
+2018-08-01  Tomas Popela  <tpopela@redhat.com>
+
+        [WTF] Rename String::format to String::deprecatedFormat
+        https://bugs.webkit.org/show_bug.cgi?id=188191
+
+        Reviewed by Darin Adler.
+
+        It should be replaced with string concatenation.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::CodeBlock::nameForRegister):
+        * inspector/InjectedScriptBase.cpp:
+        (Inspector::InjectedScriptBase::makeCall):
+        * inspector/InspectorBackendDispatcher.cpp:
+        (Inspector::BackendDispatcher::getPropertyValue):
+        * inspector/agents/InspectorConsoleAgent.cpp:
+        (Inspector::InspectorConsoleAgent::enable):
+        (Inspector::InspectorConsoleAgent::stopTiming):
+        * jsc.cpp:
+        (FunctionJSCStackFunctor::operator() const):
+        * parser/Lexer.cpp:
+        (JSC::Lexer<T>::invalidCharacterMessage const):
+        * runtime/IntlDateTimeFormat.cpp:
+        (JSC::IntlDateTimeFormat::initializeDateTimeFormat):
+        * runtime/IntlObject.cpp:
+        (JSC::canonicalizeLocaleList):
+        * runtime/LiteralParser.cpp:
+        (JSC::LiteralParser<CharType>::Lexer::lex):
+        (JSC::LiteralParser<CharType>::Lexer::lexStringSlow):
+        (JSC::LiteralParser<CharType>::parse):
+        * runtime/LiteralParser.h:
+        (JSC::LiteralParser::getErrorMessage):
+
 2018-08-01  Andy VanWagoner  <andy@vanwagoner.family>
 
         [INTL] Allow "unknown" formatToParts types
index 27af0fd..7656e8d 100644 (file)
@@ -2800,7 +2800,7 @@ String CodeBlock::nameForRegister(VirtualRegister virtualRegister)
     if (virtualRegister == thisRegister())
         return "this"_s;
     if (virtualRegister.isArgument())
-        return String::format("arguments[%3d]", virtualRegister.toArgument());
+        return String::deprecatedFormat("arguments[%3d]", virtualRegister.toArgument());
 
     return "";
 }
index c5dbc73..3dbefcf 100644 (file)
@@ -88,7 +88,7 @@ Ref<JSON::Value> InjectedScriptBase::makeCall(Deprecated::ScriptFunctionCall& fu
 
     RefPtr<JSON::Value> resultJSONValue = toInspectorValue(*m_injectedScriptObject.scriptState(), resultJSValue);
     if (!resultJSONValue)
-        return JSON::Value::create(String::format("Object has too long reference chain (must not be longer than %d)", JSON::Value::maxDepth));
+        return JSON::Value::create(String::deprecatedFormat("Object has too long reference chain (must not be longer than %d)", JSON::Value::maxDepth));
 
     return resultJSONValue.releaseNonNull();
 }
index aa4eb4e..85cb415 100644 (file)
@@ -291,19 +291,19 @@ T BackendDispatcher::getPropertyValue(JSON::Object* object, const String& name,
 
     if (!object) {
         if (!out_optionalValueFound)
-            reportProtocolError(BackendDispatcher::InvalidParams, String::format("'params' object must contain required parameter '%s' with type '%s'.", name.utf8().data(), typeName));
+            reportProtocolError(BackendDispatcher::InvalidParams, String::deprecatedFormat("'params' object must contain required parameter '%s' with type '%s'.", name.utf8().data(), typeName));
         return result;
     }
 
     auto findResult = object->find(name);
     if (findResult == object->end()) {
         if (!out_optionalValueFound)
-            reportProtocolError(BackendDispatcher::InvalidParams, String::format("Parameter '%s' with type '%s' was not found.", name.utf8().data(), typeName));
+            reportProtocolError(BackendDispatcher::InvalidParams, String::deprecatedFormat("Parameter '%s' with type '%s' was not found.", name.utf8().data(), typeName));
         return result;
     }
 
     if (!asMethod(*findResult->value, result)) {
-        reportProtocolError(BackendDispatcher::InvalidParams, String::format("Parameter '%s' has wrong type. It must be '%s'.", name.utf8().data(), typeName));
+        reportProtocolError(BackendDispatcher::InvalidParams, String::deprecatedFormat("Parameter '%s' has wrong type. It must be '%s'.", name.utf8().data(), typeName));
         return result;
     }
 
index 4cfed7c..02efd0a 100644 (file)
@@ -79,7 +79,7 @@ void InspectorConsoleAgent::enable(ErrorString&)
     m_enabled = true;
 
     if (m_expiredConsoleMessageCount) {
-        ConsoleMessage expiredMessage(MessageSource::Other, MessageType::Log, MessageLevel::Warning, String::format("%d console messages are not shown.", m_expiredConsoleMessageCount));
+        ConsoleMessage expiredMessage(MessageSource::Other, MessageType::Log, MessageLevel::Warning, String::deprecatedFormat("%d console messages are not shown.", m_expiredConsoleMessageCount));
         expiredMessage.addToFrontend(*m_frontendDispatcher, m_injectedScriptManager, false);
     }
 
@@ -164,7 +164,7 @@ void InspectorConsoleAgent::stopTiming(const String& title, Ref<ScriptCallStack>
     m_times.remove(it);
 
     Seconds elapsed = MonotonicTime::now() - startTime;
-    String message = title + String::format(": %.3fms", elapsed.milliseconds());
+    String message = title + String::deprecatedFormat(": %.3fms", elapsed.milliseconds());
     addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::Timing, MessageLevel::Debug, message, WTFMove(callStack)));
 }
 
index c49baac..e4606b0 100644 (file)
@@ -1116,7 +1116,7 @@ public:
 
     StackVisitor::Status operator()(StackVisitor& visitor) const
     {
-        m_trace.append(String::format("    %zu   %s\n", visitor->index(), visitor->toString().utf8().data()));
+        m_trace.append(String::deprecatedFormat("    %zu   %s\n", visitor->index(), visitor->toString().utf8().data()));
         return StackVisitor::Continue;
     }
 
index dacd7f2..cebbec0 100644 (file)
@@ -526,7 +526,7 @@ String Lexer<T>::invalidCharacterMessage() const
     case 96:
         return "Invalid character: '`'"_s;
     default:
-        return String::format("Invalid character '\\u%04x'", static_cast<unsigned>(m_current));
+        return String::deprecatedFormat("Invalid character '\\u%04x'", static_cast<unsigned>(m_current));
     }
 }
 
index ae3d680..9faa92b 100644 (file)
@@ -504,7 +504,7 @@ void IntlDateTimeFormat::initializeDateTimeFormat(ExecState& exec, JSValue local
         RETURN_IF_EXCEPTION(scope, void());
         tz = canonicalizeTimeZoneName(originalTz);
         if (tz.isNull()) {
-            throwRangeError(&exec, scope, String::format("invalid time zone: %s", originalTz.utf8().data()));
+            throwRangeError(&exec, scope, String::deprecatedFormat("invalid time zone: %s", originalTz.utf8().data()));
             return;
         }
     } else
index b19e95c..ad35ed9 100644 (file)
@@ -554,7 +554,7 @@ Vector<String> canonicalizeLocaleList(ExecState& state, JSValue locales)
 
             String canonicalizedTag = canonicalizeLanguageTag(tag->value(&state));
             if (canonicalizedTag.isNull()) {
-                throwException(&state, scope, createRangeError(&state, String::format("invalid language tag: %s", tag->value(&state).utf8().data())));
+                throwException(&state, scope, createRangeError(&state, String::deprecatedFormat("invalid language tag: %s", tag->value(&state).utf8().data())));
                 return Vector<String>();
             }
 
index f57a2b6..f6367f9 100644 (file)
@@ -515,7 +515,7 @@ ALWAYS_INLINE TokenType LiteralParser<CharType>::Lexer::lex(LiteralParserToken<C
             return tokenType;
         }
     }
-    m_lexErrorMessage = String::format("Unrecognized token '%c'", *m_ptr);
+    m_lexErrorMessage = String::deprecatedFormat("Unrecognized token '%c'", *m_ptr);
     return TokError;
 }
 
@@ -673,7 +673,7 @@ slowPathBegin:
                     } // uNNNN == 5 characters
                     for (int i = 1; i < 5; i++) {
                         if (!isASCIIHexDigit(m_ptr[i])) {
-                            m_lexErrorMessage = String::format("\"\\%s\" is not a valid unicode escape", String(m_ptr, 5).ascii().data());
+                            m_lexErrorMessage = String::deprecatedFormat("\"\\%s\" is not a valid unicode escape", String(m_ptr, 5).ascii().data());
                             return TokError;
                         }
                     }
@@ -687,7 +687,7 @@ slowPathBegin:
                         m_ptr++;
                         break;
                     }
-                    m_lexErrorMessage = String::format("Invalid escape character %c", *m_ptr);
+                    m_lexErrorMessage = String::deprecatedFormat("Invalid escape character %c", *m_ptr);
                     return TokError;
             }
         }
@@ -995,9 +995,9 @@ JSValue LiteralParser<CharType>::parse(ParserState initialState)
                     case TokIdentifier: {
                         typename Lexer::LiteralParserTokenPtr token = m_lexer.currentToken();
                         if (token->stringIs8Bit)
-                            m_parseErrorMessage = String::format("Unexpected identifier \"%s\"", String(token->stringToken8, token->stringLength).ascii().data());
+                            m_parseErrorMessage = String::deprecatedFormat("Unexpected identifier \"%s\"", String(token->stringToken8, token->stringLength).ascii().data());
                         else
-                            m_parseErrorMessage = String::format("Unexpected identifier \"%s\"", String(token->stringToken16, token->stringLength).ascii().data());
+                            m_parseErrorMessage = String::deprecatedFormat("Unexpected identifier \"%s\"", String(token->stringToken16, token->stringLength).ascii().data());
                         return JSValue();
                     }
                     case TokColon:
index 7c9a6d5..a15eda9 100644 (file)
@@ -102,9 +102,9 @@ public:
     String getErrorMessage()
     { 
         if (!m_lexer.getErrorMessage().isEmpty())
-            return String::format("JSON Parse error: %s", m_lexer.getErrorMessage().ascii().data());
+            return String::deprecatedFormat("JSON Parse error: %s", m_lexer.getErrorMessage().ascii().data());
         if (!m_parseErrorMessage.isEmpty())
-            return String::format("JSON Parse error: %s", m_parseErrorMessage.ascii().data());
+            return String::deprecatedFormat("JSON Parse error: %s", m_parseErrorMessage.ascii().data());
         return "JSON Parse error: Unable to parse JSON string"_s;
     }
     
index cabe9d3..a6eadbb 100644 (file)
@@ -1,3 +1,23 @@
+2018-08-01  Tomas Popela  <tpopela@redhat.com>
+
+        [WTF] Rename String::format to String::deprecatedFormat
+        https://bugs.webkit.org/show_bug.cgi?id=188191
+
+        Reviewed by Darin Adler.
+
+        It should be replaced with string concatenation.
+
+        * wtf/Assertions.cpp:
+        * wtf/JSONValues.cpp:
+        * wtf/WorkQueue.cpp:
+        (WTF::WorkQueue::concurrentApply):
+        * wtf/dtoa.cpp:
+        (WTF::dtoa):
+        * wtf/text/WTFString.cpp:
+        (WTF::String::deprecatedFormat):
+        (WTF::String::format): Deleted.
+        * wtf/text/WTFString.h:
+
 2018-07-31  Tomas Popela  <tpopela@redhat.com>
 
         [WTF] String::formatWithArguments() is unused
index fe8fac0..188cb65 100644 (file)
@@ -419,7 +419,7 @@ void WTFLog(WTFLogChannel* channel, const char* format, ...)
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wformat-nonliteral"
 #endif
-    String loggingString = String::format(format, args);
+    String loggingString = String::deprecatedFormat(format, args);
 #if COMPILER(CLANG)
 #pragma clang diagnostic pop
 #endif
index bde44ab..33c6c65 100644 (file)
@@ -472,7 +472,7 @@ inline void doubleQuoteString(const String& str, StringBuilder& dst)
                 // 1. Escaping <, > to prevent script execution.
                 // 2. Technically, we could also pass through c > 126 as UTF8, but this
                 //    is also optional. It would also be a pain to implement here.
-                dst.append(String::format("\\u%04X", c));
+                dst.append(String::deprecatedFormat("\\u%04X", c));
             } else
                 dst.append(c);
         }
index 248db08..f69158a 100644 (file)
@@ -75,7 +75,7 @@ void WorkQueue::concurrentApply(size_t iterations, WTF::Function<void (size_t in
 
             m_workers.reserveInitialCapacity(threadCount);
             for (unsigned i = 0; i < threadCount; ++i) {
-                m_workers.append(Thread::create(String::format("ThreadPool Worker %u", i).utf8().data(), [this] {
+                m_workers.append(Thread::create(String::deprecatedFormat("ThreadPool Worker %u", i).utf8().data(), [this] {
                     threadBody();
                 }));
             }
index 7b5f592..f690eaa 100644 (file)
@@ -1272,7 +1272,7 @@ static inline const char* formatStringTruncatingTrailingZerosIfNeeded(NumberToSt
 
 const char* numberToFixedPrecisionString(double d, unsigned significantFigures, NumberToStringBuffer buffer, bool truncateTrailingZeros)
 {
-    // Mimic String::format("%.[precision]g", ...), but use dtoas rounding facilities.
+    // Mimic String::deprecatedFormat("%.[precision]g", ...), but use dtoas rounding facilities.
     // "g": Signed value printed in f or e format, whichever is more compact for the given value and precision.
     // The e format is used only when the exponent of the value is less than –4 or greater than or equal to the
     // precision argument. Trailing zeros are truncated, and the decimal point appears only if one or more digits follow it.
@@ -1287,7 +1287,7 @@ const char* numberToFixedPrecisionString(double d, unsigned significantFigures,
 
 const char* numberToFixedWidthString(double d, unsigned decimalPlaces, NumberToStringBuffer buffer)
 {
-    // Mimic String::format("%.[precision]f", ...), but use dtoas rounding facilities.
+    // Mimic String::deprecatedFormat("%.[precision]f", ...), but use dtoas rounding facilities.
     // "f": Signed value having the form [ – ]dddd.dddd, where dddd is one or more decimal digits.
     // The number of digits before the decimal point depends on the magnitude of the number, and
     // the number of digits after the decimal point depends on the requested precision.
index 2b0e5f3..ace3f61 100644 (file)
@@ -499,7 +499,7 @@ WTF_ATTRIBUTE_PRINTF(1, 0) static String createWithFormatAndArguments(const char
     return StringImpl::create(reinterpret_cast<const LChar*>(buffer.data()), len);
 }
 
-String String::format(const char *format, ...)
+String String::deprecatedFormat(const char *format, ...)
 {
     va_list args;
     va_start(args, format);
index 6bf4db6..dfeb524 100644 (file)
@@ -262,7 +262,8 @@ public:
     // Use convertToASCIILowercase instead if ASCII case insensitive comparison is desired.
     WTF_EXPORT_PRIVATE String foldCase() const;
 
-    WTF_EXPORT_PRIVATE static String format(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
+    // Use string concatenation instead.
+    WTF_EXPORT_PRIVATE static String deprecatedFormat(const char *, ...) WTF_ATTRIBUTE_PRINTF(1, 2);
 
     // Returns an uninitialized string. The characters needs to be written
     // into the buffer returned in data before the returned string is used.
index c396503..8a3fd40 100644 (file)
@@ -1,3 +1,173 @@
+2018-08-01  Tomas Popela  <tpopela@redhat.com>
+
+        [WTF] Rename String::format to String::deprecatedFormat
+        https://bugs.webkit.org/show_bug.cgi?id=188191
+
+        Reviewed by Darin Adler.
+
+        It should be replaced with string concatenation.
+
+        * Modules/indexeddb/IDBKeyData.cpp:
+        (WebCore::IDBKeyData::loggingString const):
+        * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+        (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
+        * Modules/indexeddb/shared/IDBCursorInfo.cpp:
+        (WebCore::IDBCursorInfo::loggingString const):
+        * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
+        (WebCore::IDBGetAllRecordsData::loggingString const):
+        * Modules/indexeddb/shared/IDBGetRecordData.cpp:
+        (WebCore::IDBGetRecordData::loggingString const):
+        * Modules/indexeddb/shared/IDBIndexInfo.cpp:
+        (WebCore::IDBIndexInfo::loggingString const):
+        (WebCore::IDBIndexInfo::condensedLoggingString const):
+        * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
+        (WebCore::IDBIterateCursorData::loggingString const):
+        * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
+        (WebCore::IDBObjectStoreInfo::condensedLoggingString const):
+        * Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
+        (WebCore::IDBResourceIdentifier::loggingString const):
+        * Modules/webdatabase/Database.cpp:
+        (WebCore::formatErrorMessage):
+        * Modules/webdatabase/SQLError.h:
+        (WebCore::SQLError::create):
+        * Modules/websockets/WebSocket.cpp:
+        (WebCore::encodeProtocolString):
+        * accessibility/win/AccessibilityObjectWrapperWin.cpp:
+        (WebCore::AccessibilityObjectWrapper::accessibilityAttributeValue):
+        * css/CSSUnicodeRangeValue.cpp:
+        (WebCore::CSSUnicodeRangeValue::customCSSText const):
+        * css/MediaQueryEvaluator.cpp:
+        (WebCore::aspectRatioValueAsString):
+        * css/parser/CSSParserToken.cpp:
+        (WebCore::CSSParserToken::serialize const):
+        * css/parser/CSSPropertyParserHelpers.cpp:
+        (WebCore::CSSPropertyParserHelpers::parseHexColor):
+        * dom/Document.cpp:
+        (WebCore::Document::lastModified):
+        * html/FTPDirectoryDocument.cpp:
+        (WebCore::processFilesizeString):
+        (WebCore::processFileDateString):
+        * html/HTMLMediaElement.h:
+        (WTF::ValueToString<WebCore::TextTrackCue::string):
+        * html/HTMLSelectElement.cpp:
+        (WebCore::HTMLSelectElement::setLength):
+        * html/ImageDocument.cpp:
+        (WebCore::ImageDocument::imageUpdated):
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        * html/parser/XSSAuditor.cpp:
+        (WebCore::XSSAuditor::init):
+        * html/track/VTTCue.cpp:
+        (WebCore::VTTCueBox::applyCSSProperties):
+        * inspector/InspectorFrontendClientLocal.cpp:
+        (WebCore::InspectorFrontendClientLocal::setDockingUnavailable):
+        (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
+        (WebCore::InspectorFrontendClientLocal::setDebuggingEnabled):
+        (WebCore::InspectorFrontendClientLocal::setTimelineProfilingEnabled):
+        (WebCore::InspectorFrontendClientLocal::showMainResourceForFrame):
+        * inspector/agents/InspectorCSSAgent.cpp:
+        * inspector/agents/InspectorIndexedDBAgent.cpp:
+        * page/CaptionUserPreferencesMediaAF.cpp:
+        (WebCore::CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS const):
+        * page/History.cpp:
+        (WebCore::History::stateObjectAdded):
+        * page/MemoryRelease.cpp:
+        (WebCore::logMemoryStatisticsAtTimeOfDeath):
+        * page/cocoa/ResourceUsageOverlayCocoa.mm:
+        (WebCore::formatByteNumber):
+        (WebCore::gcTimerString):
+        (WebCore::ResourceUsageOverlay::platformDraw):
+        * page/cocoa/ResourceUsageThreadCocoa.mm:
+        (WebCore::logFootprintComparison):
+        * page/linux/ResourceUsageOverlayLinux.cpp:
+        (WebCore::cpuUsageString):
+        (WebCore::formatByteNumber):
+        (WebCore::gcTimerString):
+        * page/scrolling/AxisScrollSnapOffsets.cpp:
+        (WebCore::snapOffsetsToString):
+        (WebCore::snapOffsetRangesToString):
+        (WebCore::snapPortOrAreaToString):
+        * platform/DateComponents.cpp:
+        (WebCore::DateComponents::toStringForTime const):
+        (WebCore::DateComponents::toString const):
+        * platform/LocalizedStrings.cpp:
+        * platform/animation/TimingFunction.cpp:
+        (WebCore::TimingFunction::cssText const):
+        * platform/audio/HRTFElevation.cpp:
+        (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
+        * platform/cocoa/KeyEventCocoa.mm:
+        (WebCore::keyIdentifierForCharCode):
+        * platform/gamepad/mac/HIDGamepad.cpp:
+        (WebCore::HIDGamepad::HIDGamepad):
+        * platform/glib/UserAgentGLib.cpp:
+        (WebCore::platformVersionForUAString):
+        * platform/graphics/Color.cpp:
+        (WebCore::Color::nameForRenderTreeAsText const):
+        * platform/graphics/FloatPolygon.h:
+        (WTF::ValueToString<WebCore::FloatPolygonEdge::string):
+        * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
+        (WebCore::AVTrackPrivateAVFObjCImpl::id const):
+        * platform/graphics/avfoundation/MediaSampleAVFObjC.h:
+        (WebCore::MediaSampleAVFObjC::MediaSampleAVFObjC):
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::setName):
+        (WebCore::GraphicsLayerCA::setContentsToSolidColor):
+        (WebCore::GraphicsLayerCA::recursiveCommitChanges):
+        (WebCore::GraphicsLayerCA::updateContentsImage):
+        (WebCore::GraphicsLayerCA::updateContentsRects):
+        (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
+        * platform/graphics/gstreamer/GStreamerCommon.cpp:
+        (WebCore::simpleBusMessageCallback):
+        * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
+        (WebCore::MediaPlayerPrivateGStreamer::load):
+        (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
+        (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
+        * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
+        (WebCore::AppendPipeline::handleStateChangeMessage):
+        (WebCore::AppendPipeline::resetPipeline):
+        * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
+        (WebCore::MediaPlayerPrivateGStreamerMSE::load):
+        (WebCore::MediaPlayerPrivateGStreamerMSE::doSeek):
+        * platform/graphics/gtk/ImageBufferGtk.cpp:
+        (WebCore::encodeImage):
+        * platform/gtk/PlatformKeyboardEventGtk.cpp:
+        (WebCore::PlatformKeyboardEvent::keyIdentifierForGdkKeyCode):
+        * platform/mediastream/gstreamer/GStreamerAudioCaptureSource.cpp:
+        (WebCore::GStreamerAudioCaptureSource::create):
+        * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
+        (WebCore::webkitMediaStreamSrcAddPad):
+        * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
+        (WebCore::GStreamerVideoCaptureSource::create):
+        * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp:
+        (WebCore::GStreamerVideoEncoder::makeElement):
+        * platform/mock/MockRealtimeVideoSource.cpp:
+        (WebCore::MockRealtimeVideoSource::drawText):
+        * platform/mock/mediasource/MockSourceBufferPrivate.cpp:
+        * platform/network/ParsedContentRange.cpp:
+        (WebCore::ParsedContentRange::headerValue const):
+        * platform/network/cf/NetworkStorageSessionCFNet.cpp:
+        (WebCore::NetworkStorageSession::switchToNewTestingSession):
+        * platform/sql/SQLiteDatabase.cpp:
+        (WebCore::unauthorizedSQLFunction):
+        * platform/text/PlatformLocale.cpp:
+        (WebCore::DateTimeStringBuilder::visitField):
+        * platform/win/GDIObjectCounter.cpp:
+        (WebCore::GDIObjectCounter::GDIObjectCounter):
+        * platform/win/KeyEventWin.cpp:
+        (WebCore::keyIdentifierForWindowsKeyCode):
+        * rendering/FloatingObjects.h:
+        (WTF::ValueToString<WebCore::FloatingObject::string):
+        * rendering/RenderFragmentedFlow.h:
+        (WTF::ValueToString<WebCore::RenderFragmentContainer::string):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::logLayerInfo):
+        * rendering/RenderTheme.cpp:
+        (WebCore::RenderTheme::formatMediaControlsTime const):
+        * testing/Internals.cpp:
+        (WebCore::Internals::address):
+        * workers/service/server/RegistrationDatabase.cpp:
+        (WebCore::RegistrationDatabase::ensureValidRecordsTable):
+        (WebCore::RegistrationDatabase::importRecords):
+
 2018-08-01  Alex Christensen  <achristensen@webkit.org>
 
         Move all calls to ResourceLoader::start to WebKitLegacy
index 2e8cedc..bc51583 100644 (file)
@@ -348,7 +348,7 @@ String IDBKeyData::loggingString() const
 
         size_t i = 0;
         for (; i < 8 && i < data->size(); ++i)
-            builder.append(String::format("%02x", data->at(i)));
+            builder.append(String::deprecatedFormat("%02x", data->at(i)));
 
         if (data->size() > 8)
             builder.append("...");
@@ -360,9 +360,9 @@ String IDBKeyData::loggingString() const
         result = "<string> - " + WTF::get<String>(m_value);
         break;
     case KeyType::Date:
-        return String::format("<date> - %f", WTF::get<double>(m_value));
+        return String::deprecatedFormat("<date> - %f", WTF::get<double>(m_value));
     case KeyType::Number:
-        return String::format("<number> - %f", WTF::get<double>(m_value));
+        return String::deprecatedFormat("<number> - %f", WTF::get<double>(m_value));
     case KeyType::Max:
         return "<maximum>";
     case KeyType::Min:
index 5e5d76c..7bd1851 100644 (file)
@@ -1789,7 +1789,7 @@ IDBError SQLiteIDBBackingStore::addRecord(const IDBResourceIdentifier& transacti
         }
 
         // We don't already have a file for this blobURL, so commit our file as a unique filename
-        String storedFilename = String::format("%" PRId64 ".blob", potentialFileNameInteger);
+        String storedFilename = String::deprecatedFormat("%" PRId64 ".blob", potentialFileNameInteger);
         {
             auto* sql = cachedStatement(SQL::AddBlobFilename, "INSERT INTO BlobFiles VALUES (?, ?);"_s);
             if (!sql
index 0d3e338..5dc24e0 100644 (file)
@@ -103,9 +103,9 @@ IDBCursorInfo IDBCursorInfo::isolatedCopy() const
 String IDBCursorInfo::loggingString() const
 {
     if (m_source == IndexedDB::CursorSource::Index)
-        return String::format("<Crsr: %s Idx %" PRIu64 ", OS %" PRIu64 ", tx %s>", m_cursorIdentifier.loggingString().utf8().data(), m_sourceIdentifier, m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
+        return String::deprecatedFormat("<Crsr: %s Idx %" PRIu64 ", OS %" PRIu64 ", tx %s>", m_cursorIdentifier.loggingString().utf8().data(), m_sourceIdentifier, m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
 
-    return String::format("<Crsr: %s OS %" PRIu64 ", tx %s>", m_cursorIdentifier.loggingString().utf8().data(), m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
+    return String::deprecatedFormat("<Crsr: %s OS %" PRIu64 ", tx %s>", m_cursorIdentifier.loggingString().utf8().data(), m_objectStoreIdentifier, m_transactionIdentifier.loggingString().utf8().data());
 }
 #endif
 
index 92b6b92..2c24470 100644 (file)
@@ -41,8 +41,8 @@ IDBGetAllRecordsData IDBGetAllRecordsData::isolatedCopy() const
 String IDBGetAllRecordsData::loggingString() const
 {
     if (indexIdentifier)
-        return String::format("<GetAllRecords: Idx %" PRIu64 ", OS %" PRIu64 ", %s, range %s>", indexIdentifier, objectStoreIdentifier, getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", keyRangeData.loggingString().utf8().data());
-    return String::format("<GetAllRecords: OS %" PRIu64 ", %s, range %s>", objectStoreIdentifier, getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", keyRangeData.loggingString().utf8().data());
+        return String::deprecatedFormat("<GetAllRecords: Idx %" PRIu64 ", OS %" PRIu64 ", %s, range %s>", indexIdentifier, objectStoreIdentifier, getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", keyRangeData.loggingString().utf8().data());
+    return String::deprecatedFormat("<GetAllRecords: OS %" PRIu64 ", %s, range %s>", objectStoreIdentifier, getAllType == IndexedDB::GetAllType::Keys ? "Keys" : "Values", keyRangeData.loggingString().utf8().data());
 }
 #endif
 
index d789626..b3fd9de 100644 (file)
@@ -40,7 +40,7 @@ IDBGetRecordData IDBGetRecordData::isolatedCopy() const
 #if !LOG_DISABLED
 String IDBGetRecordData::loggingString() const
 {
-    return String::format("<GetRecord: %s %s>", type == IDBGetRecordDataType::KeyOnly ? "KeyOnly" : "Key+Value", keyRangeData.loggingString().utf8().data());
+    return String::deprecatedFormat("<GetRecord: %s %s>", type == IDBGetRecordDataType::KeyOnly ? "KeyOnly" : "Key+Value", keyRangeData.loggingString().utf8().data());
 }
 #endif
 
index 27290f4..0417ae5 100644 (file)
@@ -56,12 +56,12 @@ String IDBIndexInfo::loggingString(int indent) const
     for (int i = 0; i < indent; ++i)
         indentString.append(" ");
 
-    return makeString(indentString, "Index: ", m_name, String::format(" (%" PRIu64 ") keyPath: %s\n", m_identifier, WebCore::loggingString(m_keyPath).utf8().data()));
+    return makeString(indentString, "Index: ", m_name, String::deprecatedFormat(" (%" PRIu64 ") keyPath: %s\n", m_identifier, WebCore::loggingString(m_keyPath).utf8().data()));
 }
 
 String IDBIndexInfo::condensedLoggingString() const
 {
-    return String::format("<Idx: %s (%" PRIu64 "), OS (%" PRIu64 ")>", m_name.utf8().data(), m_identifier, m_objectStoreIdentifier);
+    return String::deprecatedFormat("<Idx: %s (%" PRIu64 "), OS (%" PRIu64 ")>", m_name.utf8().data(), m_identifier, m_objectStoreIdentifier);
 }
 #endif
 
index faaeda9..ed69e34 100644 (file)
@@ -38,7 +38,7 @@ IDBIterateCursorData IDBIterateCursorData::isolatedCopy() const
 #if !LOG_DISABLED
 String IDBIterateCursorData::loggingString() const
 {
-    return String::format("<Itr8Crsr: key %s, primaryKey %s, count %u>", keyData.loggingString().utf8().data(), primaryKeyData.loggingString().utf8().data(), count);
+    return String::deprecatedFormat("<Itr8Crsr: key %s, primaryKey %s, count %u>", keyData.loggingString().utf8().data(), primaryKeyData.loggingString().utf8().data(), count);
 }
 #endif
 
index b0075fe..ce8a0c5 100644 (file)
@@ -153,7 +153,7 @@ String IDBObjectStoreInfo::loggingString(int indent) const
 
 String IDBObjectStoreInfo::condensedLoggingString() const
 {
-    return String::format("<OS: %s (%" PRIu64 ")>", m_name.utf8().data(), m_identifier);
+    return String::deprecatedFormat("<OS: %s (%" PRIu64 ")>", m_name.utf8().data(), m_identifier);
 }
 
 #endif
index d7e3f17..22af3a2 100644 (file)
@@ -100,7 +100,7 @@ bool IDBResourceIdentifier::isHashTableDeletedValue() const
 #if !LOG_DISABLED
 String IDBResourceIdentifier::loggingString() const
 {
-    return String::format("<%" PRIu64", %" PRIu64">", m_idbConnectionIdentifier, m_resourceNumber);
+    return String::deprecatedFormat("<%" PRIu64", %" PRIu64">", m_idbConnectionIdentifier, m_resourceNumber);
 }
 #endif
 } // namespace WebCore
index 4915fcc..06dd8f8 100644 (file)
@@ -106,7 +106,7 @@ static const char* fullyQualifiedInfoTableName()
 
 static String formatErrorMessage(const char* message, int sqliteErrorCode, const char* sqliteErrorMessage)
 {
-    return String::format("%s (%d %s)", message, sqliteErrorCode, sqliteErrorMessage);
+    return String::deprecatedFormat("%s (%d %s)", message, sqliteErrorCode, sqliteErrorMessage);
 }
 
 static bool setTextValueInDatabase(SQLiteDatabase& db, const String& query, const String& value)
index 4e276ca..701b84b 100644 (file)
@@ -38,11 +38,11 @@ public:
     static Ref<SQLError> create(unsigned code, const String& message) { return adoptRef(*new SQLError(code, message)); }
     static Ref<SQLError> create(unsigned code, const char* message, int sqliteCode)
     {
-        return create(code, String::format("%s (%d)", message, sqliteCode));
+        return create(code, String::deprecatedFormat("%s (%d)", message, sqliteCode));
     }
     static Ref<SQLError> create(unsigned code, const char* message, int sqliteCode, const char* sqliteMessage)
     {
-        return create(code, String::format("%s (%d %s)", message, sqliteCode, sqliteMessage));
+        return create(code, String::deprecatedFormat("%s (%d %s)", message, sqliteCode, sqliteMessage));
     }
 
     unsigned code() const { return m_code; }
index 02dac6e..1983b65 100644 (file)
@@ -99,7 +99,7 @@ static String encodeProtocolString(const String& protocol)
     StringBuilder builder;
     for (size_t i = 0; i < protocol.length(); i++) {
         if (protocol[i] < 0x20 || protocol[i] > 0x7E)
-            builder.append(String::format("\\u%04X", protocol[i]));
+            builder.append(String::deprecatedFormat("\\u%04X", protocol[i]));
         else if (protocol[i] == 0x5c)
             builder.appendLiteral("\\\\");
         else
index 46d8ebb..914773c 100644 (file)
@@ -1,3 +1,15 @@
+2018-08-01  Tomas Popela  <tpopela@redhat.com>
+
+        [WTF] Rename String::format to String::deprecatedFormat
+        https://bugs.webkit.org/show_bug.cgi?id=188191
+
+        Reviewed by Darin Adler.
+
+        It should be replaced with string concatenation.
+
+        * pal/FileSizeFormatter.cpp:
+        (fileSizeDescription):
+
 2018-08-01  Tim Horton  <timothy_horton@apple.com>
 
         Using the keyboard arrow keys to scroll a webpage is very slow, not smooth, takes too long
index 6af6512..c03731a 100644 (file)
@@ -33,12 +33,12 @@ String fileSizeDescription(uint64_t size)
     // FIXME: These strings should be localized, but that would require bringing LocalizedStrings into PAL.
     // See <https://bugs.webkit.org/show_bug.cgi?id=179019> for more details.
     if (size < 1000)
-        return String::format("%tu bytes", size);
+        return String::deprecatedFormat("%tu bytes", size);
     if (size < 1000000)
-        return String::format("%.1f KB", size / 1000.);
+        return String::deprecatedFormat("%.1f KB", size / 1000.);
     if (size < 1000000000)
-        return String::format("%.1f MB", size / 1000000.);
-    return String::format("%.1f GB", size / 1000000000.);
+        return String::deprecatedFormat("%.1f MB", size / 1000000.);
+    return String::deprecatedFormat("%.1f GB", size / 1000000000.);
 }
 
 #endif
index 9d5175c..4bdbbad 100644 (file)
@@ -72,7 +72,7 @@ void AccessibilityObjectWrapper::accessibilityAttributeValue(const AtomicString&
         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 = String::deprecatedFormat("{%u, %u}", textRange.start, textRange.length);
         V_BSTR(result) = WebCore::BString(range).release();
         return;
     }
index 8426cee..c17b23c 100644 (file)
@@ -32,7 +32,7 @@ namespace WebCore {
 
 String CSSUnicodeRangeValue::customCSSText() const
 {
-    return String::format("U+%x-%x", m_from, m_to);
+    return String::deprecatedFormat("U+%x-%x", m_from, m_to);
 }
 
 bool CSSUnicodeRangeValue::equals(const CSSUnicodeRangeValue& other) const
index 06368c0..b0c999d 100644 (file)
@@ -229,7 +229,7 @@ static String aspectRatioValueAsString(CSSValue* value)
         return emptyString();
 
     auto& aspectRatio = downcast<CSSAspectRatioValue>(*value);
-    return String::format("%f/%f", aspectRatio.numeratorValue(), aspectRatio.denominatorValue());
+    return String::deprecatedFormat("%f/%f", aspectRatio.numeratorValue(), aspectRatio.denominatorValue());
 }
 #endif
 
index 7b8e603..2efbea8 100644 (file)
@@ -423,7 +423,7 @@ void CSSParserToken::serialize(StringBuilder& builder) const
         serializeIdentifier(value().toString(), builder);
         break;
     case UnicodeRangeToken:
-        return builder.append(String::format("U+%X-%X", unicodeRangeStart(), unicodeRangeEnd()));
+        return builder.append(String::deprecatedFormat("U+%X-%X", unicodeRangeStart(), unicodeRangeEnd()));
     case StringToken:
         return serializeString(value().toString(), builder);
 
index a44a526..2be6aac 100644 (file)
@@ -640,7 +640,7 @@ static Color parseHexColor(CSSParserTokenRange& range, bool acceptQuirkyColors)
                 || token.numericValue() < 0. || token.numericValue() >= 1000000.)
                 return Color();
             if (token.type() == NumberToken) // e.g. 112233
-                color = String::format("%d", static_cast<int>(token.numericValue()));
+                color = String::deprecatedFormat("%d", static_cast<int>(token.numericValue()));
             else // e.g. 0001FF
                 color = String::number(static_cast<int>(token.numericValue())) + token.value().toString();
             while (color.length() < 6)
index d0ebe6f..bde93a0 100644 (file)
@@ -4685,7 +4685,7 @@ String Document::lastModified()
 
     auto ctime = dateTime.value().secondsSinceEpoch().secondsAs<time_t>();
     auto localDateTime = std::localtime(&ctime);
-    return String::format("%02d/%02d/%04d %02d:%02d:%02d", localDateTime->tm_mon + 1, localDateTime->tm_mday, 1900 + localDateTime->tm_year, localDateTime->tm_hour, localDateTime->tm_min, localDateTime->tm_sec);
+    return String::deprecatedFormat("%02d/%02d/%04d %02d:%02d:%02d", localDateTime->tm_mon + 1, localDateTime->tm_mday, 1900 + localDateTime->tm_year, localDateTime->tm_hour, localDateTime->tm_min, localDateTime->tm_sec);
 }
 
 void Document::setCookieURL(const URL& url)
index d7e2b75..d8309d3 100644 (file)
@@ -167,12 +167,12 @@ static String processFilesizeString(const String& size, bool isDirectory)
         return unknownFileSizeText();
 
     if (bytes < 1000000)
-        return String::format("%.2f KB", static_cast<float>(bytes)/1000);
+        return String::deprecatedFormat("%.2f KB", static_cast<float>(bytes) / 1000);
 
     if (bytes < 1000000000)
-        return String::format("%.2f MB", static_cast<float>(bytes)/1000000);
+        return String::deprecatedFormat("%.2f MB", static_cast<float>(bytes) / 1000000);
 
-    return String::format("%.2f GB", static_cast<float>(bytes)/1000000000);
+    return String::deprecatedFormat("%.2f GB", static_cast<float>(bytes) / 1000000000);
 }
 
 static bool wasLastDayOfMonth(int year, int month, int day)
@@ -209,12 +209,12 @@ static String processFileDateString(const FTPTime& fileTime)
         if (hour < 12) {
             if (hour == 0)
                 hour = 12;
-            timeOfDay = String::format(", %i:%02i AM", hour, fileTime.tm_min);
+            timeOfDay = String::deprecatedFormat(", %i:%02i AM", hour, fileTime.tm_min);
         } else {
             hour = hour - 12;
             if (hour == 0)
                 hour = 12;
-            timeOfDay = String::format(", %i:%02i PM", hour, fileTime.tm_min);
+            timeOfDay = String::deprecatedFormat(", %i:%02i PM", hour, fileTime.tm_min);
         }
     }
 
index a78ecfd..8752463 100644 (file)
@@ -1200,7 +1200,7 @@ template <> struct ValueToString<WebCore::TextTrackCue*> {
         String text;
         if (cue->isRenderable())
             text = WebCore::toVTTCue(cue)->text();
-        return String::format("%p id=%s interval=%s-->%s cue=%s)", cue, cue->id().utf8().data(), toString(cue->startTime()).utf8().data(), toString(cue->endTime()).utf8().data(), text.utf8().data());
+        return String::deprecatedFormat("%p id=%s interval=%s-->%s cue=%s)", cue, cue->id().utf8().data(), toString(cue->startTime()).utf8().data(), toString(cue->endTime()).utf8().data(), text.utf8().data());
     }
 };
 
index 6213dbd..1485d5d 100644 (file)
@@ -458,7 +458,7 @@ ExceptionOr<void> HTMLSelectElement::setItem(unsigned index, HTMLOptionElement*
 ExceptionOr<void> HTMLSelectElement::setLength(unsigned newLength)
 {
     if (newLength > length() && newLength > maxSelectItems) {
-        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, String::format("Blocked attempt to expand the option list to %u items. The maximum number of items allowed is %u.", newLength, maxSelectItems));
+        document().addConsoleMessage(MessageSource::Other, MessageLevel::Warning, String::deprecatedFormat("Blocked attempt to expand the option list to %u items. The maximum number of items allowed is %u.", newLength, maxSelectItems));
         return { };
     }
 
index 0518ff8..f54a4a0 100644 (file)
@@ -273,7 +273,7 @@ void ImageDocument::imageUpdated()
 #if PLATFORM(IOS)
         FloatSize screenSize = page()->chrome().screenSize();
         if (imageSize.width() > screenSize.width())
-            processViewport(String::format("width=%u", static_cast<unsigned>(imageSize.width().toInt())), ViewportArguments::ImageDocument);
+            processViewport(String::deprecatedFormat("width=%u", static_cast<unsigned>(imageSize.width().toInt())), ViewportArguments::ImageDocument);
         if (page())
             page()->chrome().client().imageOrMediaDocumentSizeChanged(IntSize(imageSize.width(), imageSize.height()));
 #else
index fe8375b..4d3c69a 100644 (file)
@@ -6182,7 +6182,7 @@ namespace {
         case GraphicsContext3D::CONTEXT_LOST_WEBGL:
             return "CONTEXT_LOST_WEBGL"_s;
         default:
-            return String::format("WebGL ERROR(%04x)", error);
+            return String::deprecatedFormat("WebGL ERROR(%04x)", error);
         }
     }
 
index 2ac8a2a..2cd764b 100644 (file)
@@ -336,7 +336,7 @@ void XSSAuditor::init(Document* document, XSSAuditorDelegate* auditorDelegate)
             }
         }
         if (m_xssProtection == XSSProtectionDisposition::Invalid) {
-            document->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Error parsing header X-XSS-Protection: " + headerValue + ": "  + errorDetails + " at character position " + String::format("%u", errorPosition) + ". The default protections will be applied.");
+            document->addConsoleMessage(MessageSource::Security, MessageLevel::Error, "Error parsing header X-XSS-Protection: " + headerValue + ": "  + errorDetails + " at character position " + String::deprecatedFormat("%u", errorPosition) + ". The default protections will be applied.");
             m_xssProtection = XSSProtectionDisposition::Enabled;
         }
 
index 191074c..b15206b 100644 (file)
@@ -221,7 +221,7 @@ void VTTCueBox::applyCSSProperties(const IntSize& videoSize)
         // maintaining the relative positions of the boxes in boxes to each
         // other.
         setInlineStyleProperty(CSSPropertyTransform,
-            String::format("translate(-%.2f%%, -%.2f%%)", position.first, position.second));
+            String::deprecatedFormat("translate(-%.2f%%, -%.2f%%)", position.first, position.second));
 
         setInlineStyleProperty(CSSPropertyWhiteSpace, CSSValuePre);
     }
index 8e1c482..7899d6f 100644 (file)
@@ -205,7 +205,7 @@ bool InspectorFrontendClientLocal::canAttachWindow()
 
 void InspectorFrontendClientLocal::setDockingUnavailable(bool unavailable)
 {
-    evaluateOnLoad(String::format("[\"setDockingUnavailable\", %s]", unavailable ? "true" : "false"));
+    evaluateOnLoad(String::deprecatedFormat("[\"setDockingUnavailable\", %s]", unavailable ? "true" : "false"));
 }
 
 void InspectorFrontendClientLocal::changeAttachedWindowHeight(unsigned height)
@@ -270,7 +270,7 @@ void InspectorFrontendClientLocal::setAttachedWindow(DockSide dockSide)
 
     m_dockSide = dockSide;
 
-    evaluateOnLoad(String::format("[\"setDockSide\", \"%s\"]", side));
+    evaluateOnLoad(String::deprecatedFormat("[\"setDockSide\", \"%s\"]", side));
 }
 
 void InspectorFrontendClientLocal::restoreAttachedWindowHeight()
@@ -294,7 +294,7 @@ bool InspectorFrontendClientLocal::isDebuggingEnabled()
 
 void InspectorFrontendClientLocal::setDebuggingEnabled(bool enabled)
 {
-    evaluateOnLoad(String::format("[\"setDebuggingEnabled\", %s]", enabled ? "true" : "false"));
+    evaluateOnLoad(String::deprecatedFormat("[\"setDebuggingEnabled\", %s]", enabled ? "true" : "false"));
 }
 
 bool InspectorFrontendClientLocal::isTimelineProfilingEnabled()
@@ -306,7 +306,7 @@ bool InspectorFrontendClientLocal::isTimelineProfilingEnabled()
 
 void InspectorFrontendClientLocal::setTimelineProfilingEnabled(bool enabled)
 {
-    evaluateOnLoad(String::format("[\"setTimelineProfilingEnabled\", %s]", enabled ? "true" : "false"));
+    evaluateOnLoad(String::deprecatedFormat("[\"setTimelineProfilingEnabled\", %s]", enabled ? "true" : "false"));
 }
 
 bool InspectorFrontendClientLocal::isProfilingJavaScript()
@@ -339,7 +339,7 @@ void InspectorFrontendClientLocal::showResources()
 void InspectorFrontendClientLocal::showMainResourceForFrame(Frame* frame)
 {
     String frameId = m_inspectedPageController->pageAgent()->frameId(frame);
-    evaluateOnLoad(String::format("[\"showMainResourceForFrame\", \"%s\"]", frameId.ascii().data()));
+    evaluateOnLoad(String::deprecatedFormat("[\"showMainResourceForFrame\", \"%s\"]", frameId.ascii().data()));
 }
 
 unsigned InspectorFrontendClientLocal::constrainedAttachedWindowHeight(unsigned preferredHeight, unsigned totalWindowHeight)
index 206eae3..96bc2d8 100644 (file)
@@ -154,7 +154,7 @@ private:
 
     String mergeId() final
     {
-        return String::format("SetStyleSheetText %s", m_styleSheet->id().utf8().data());
+        return String::deprecatedFormat("SetStyleSheetText %s", m_styleSheet->id().utf8().data());
     }
 
     void merge(std::unique_ptr<Action> action) override
@@ -195,7 +195,7 @@ public:
     String mergeId() override
     {
         ASSERT(m_styleSheet->id() == m_cssId.styleSheetId());
-        return String::format("SetStyleText %s:%u", m_styleSheet->id().utf8().data(), m_cssId.ordinal());
+        return String::deprecatedFormat("SetStyleText %s:%u", m_styleSheet->id().utf8().data(), m_cssId.ordinal());
     }
 
     void merge(std::unique_ptr<Action> action) override
index ae3acaf..f0d5a8c 100644 (file)
@@ -711,7 +711,7 @@ public:
             auto result = idbObjectStore->clear(*exec);
             ASSERT(!result.hasException());
             if (result.hasException()) {
-                m_requestCallback->sendFailure(String::format("Could not clear object store '%s': %d", m_objectStoreName.utf8().data(), result.releaseException().code()));
+                m_requestCallback->sendFailure(String::deprecatedFormat("Could not clear object store '%s': %d", m_objectStoreName.utf8().data(), result.releaseException().code()));
                 return;
             }
             idbRequest = result.releaseReturnValue();
index c139076..5ff6263 100644 (file)
@@ -346,7 +346,7 @@ String CaptionUserPreferencesMediaAF::windowRoundedCornerRadiusCSS() const
         return emptyString();
 
     StringBuilder builder;
-    appendCSS(builder, CSSPropertyBorderRadius, String::format("%.02fpx", radius), behavior == kMACaptionAppearanceBehaviorUseValue);
+    appendCSS(builder, CSSPropertyBorderRadius, String::deprecatedFormat("%.02fpx", radius), behavior == kMACaptionAppearanceBehaviorUseValue);
     return builder.toString();
 }
 
index 8e1bb14..7d1cf2b 100644 (file)
@@ -218,8 +218,8 @@ ExceptionOr<void> History::stateObjectAdded(RefPtr<SerializedScriptValue>&& data
     
     if (mainHistory->m_currentStateObjectTimeSpanObjectsAdded >= perStateObjectTimeSpanLimit) {
         if (stateObjectType == StateObjectType::Replace)
-            return Exception { SecurityError, String::format("Attempt to use history.replaceState() more than %u times per %f seconds", perStateObjectTimeSpanLimit, stateObjectTimeSpan.seconds()) };
-        return Exception { SecurityError, String::format("Attempt to use history.pushState() more than %u times per %f seconds", perStateObjectTimeSpanLimit, stateObjectTimeSpan.seconds()) };
+            return Exception { SecurityError, String::deprecatedFormat("Attempt to use history.replaceState() more than %u times per %f seconds", perStateObjectTimeSpanLimit, stateObjectTimeSpan.seconds()) };
+        return Exception { SecurityError, String::deprecatedFormat("Attempt to use history.pushState() more than %u times per %f seconds", perStateObjectTimeSpanLimit, stateObjectTimeSpan.seconds()) };
     }
 
     Checked<unsigned> titleSize = title.length();
index 57778bf..52e5c8c 100644 (file)
@@ -166,7 +166,7 @@ void logMemoryStatisticsAtTimeOfDeath()
             continue;
         String tagName = displayNameForVMTag(i);
         if (!tagName)
-            tagName = String::format("Tag %u", i);
+            tagName = String::deprecatedFormat("Tag %u", i);
         RELEASE_LOG(MemoryPressure, "%16s: %lu MB", tagName.latin1().data(), dirty / MB);
     }
 #endif
index a33ef2a..5de87c8 100644 (file)
@@ -425,19 +425,19 @@ static void drawMemoryPie(CGContextRef context, FloatRect& rect, HistoricResourc
 static String formatByteNumber(size_t number)
 {
     if (number >= 1024 * 1048576)
-        return String::format("%.3f GB", static_cast<double>(number) / (1024 * 1048576));
+        return String::deprecatedFormat("%.3f GB", static_cast<double>(number) / (1024 * 1048576));
     if (number >= 1048576)
-        return String::format("%.2f MB", static_cast<double>(number) / 1048576);
+        return String::deprecatedFormat("%.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::deprecatedFormat("%.1f kB", static_cast<double>(number) / 1024);
+    return String::deprecatedFormat("%lu", number);
 }
 
 static String gcTimerString(MonotonicTime timerFireDate, MonotonicTime now)
 {
     if (std::isnan(timerFireDate))
         return "[not scheduled]"_s;
-    return String::format("%g", (timerFireDate - now).seconds());
+    return String::deprecatedFormat("%g", (timerFireDate - now).seconds());
 }
 
 void ResourceUsageOverlay::platformDraw(CGContextRef context)
@@ -456,7 +456,7 @@ void ResourceUsageOverlay::platformDraw(CGContextRef context)
     CGContextClearRect(context, viewBounds);
 
     static CGColorRef colorForLabels = createColor(0.9, 0.9, 0.9, 1);
-    showText(context, 10, 20, colorForLabels, String::format("        CPU: %g", data.cpu.last()));
+    showText(context, 10, 20, colorForLabels, String::deprecatedFormat("        CPU: %g", data.cpu.last()));
     showText(context, 10, 30, colorForLabels, "  Footprint: " + formatByteNumber(data.totalDirtySize.last()));
     showText(context, 10, 40, colorForLabels, "   External: " + formatByteNumber(data.totalExternalSize.last()));
 
@@ -466,11 +466,11 @@ void ResourceUsageOverlay::platformDraw(CGContextRef context)
         size_t reclaimable = category.reclaimableSize.last();
         size_t external = category.externalSize.last();
         
-        String label = String::format("% 11s: %s", category.name.ascii().data(), formatByteNumber(dirty).ascii().data());
+        String label = String::deprecatedFormat("% 11s: %s", category.name.ascii().data(), formatByteNumber(dirty).ascii().data());
         if (external)
-            label = label + String::format(" + %s", formatByteNumber(external).ascii().data());
+            label = label + String::deprecatedFormat(" + %s", formatByteNumber(external).ascii().data());
         if (reclaimable)
-            label = label + String::format(" [%s]", formatByteNumber(reclaimable).ascii().data());
+            label = label + String::deprecatedFormat(" [%s]", formatByteNumber(reclaimable).ascii().data());
 
         // FIXME: Show size/capacity of GC heap.
         showText(context, 10, y, category.color.get(), label);
@@ -479,8 +479,8 @@ void ResourceUsageOverlay::platformDraw(CGContextRef context)
     y -= 5;
 
     MonotonicTime now = MonotonicTime::now();
-    showText(context, 10, y + 10, colorForLabels, String::format("    Eden GC: %s", gcTimerString(data.timeOfNextEdenCollection, now).ascii().data()));
-    showText(context, 10, y + 20, colorForLabels, String::format("    Full GC: %s", gcTimerString(data.timeOfNextFullCollection, now).ascii().data()));
+    showText(context, 10, y + 10, colorForLabels, String::deprecatedFormat("    Eden GC: %s", gcTimerString(data.timeOfNextEdenCollection, now).ascii().data()));
+    showText(context, 10, y + 20, colorForLabels, String::deprecatedFormat("    Full GC: %s", gcTimerString(data.timeOfNextFullCollection, now).ascii().data()));
 
     drawCpuHistory(context, viewBounds.size.width - 70, 0, viewBounds.size.height, data.cpu);
     drawGCHistory(context, viewBounds.size.width - 140, 0, viewBounds.size.height, data.gcHeapSize, data.categories[MemoryCategory::GCHeap].dirtySize);
index 7e48224..c464e3e 100644 (file)
@@ -62,7 +62,7 @@ void logFootprintComparison(const std::array<TagInfo, 256>& before, const std::a
             continue;
         String tagName = displayNameForVMTag(i);
         if (!tagName)
-            tagName = String::format("Tag %u", i);
+            tagName = String::deprecatedFormat("Tag %u", i);
         WTFLogAlways("  %02X %16s %10ld %10ld %10ld",
             i,
             tagName.ascii().data(),
index 13d9ca2..a5f9da8 100644 (file)
@@ -45,25 +45,25 @@ static String cpuUsageString(float cpuUsage)
 {
     if (cpuUsage < 0)
         return "<unknown>"_s;
-    return String::format("%.1f%%", cpuUsage);
+    return String::deprecatedFormat("%.1f%%", cpuUsage);
 }
 
 static String formatByteNumber(size_t number)
 {
     if (number >= 1024 * 1048576)
-        return String::format("%.3f GB", static_cast<double>(number) / (1024 * 1048576));
+        return String::deprecatedFormat("%.3f GB", static_cast<double>(number) / (1024 * 1048576));
     if (number >= 1048576)
-        return String::format("%.2f MB", static_cast<double>(number) / 1048576);
+        return String::deprecatedFormat("%.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::deprecatedFormat("%.1f kB", static_cast<double>(number) / 1024);
+    return String::deprecatedFormat("%lu", number);
 }
 
 static String gcTimerString(MonotonicTime timerFireDate, MonotonicTime now)
 {
     if (std::isnan(timerFireDate))
         return "[not scheduled]"_s;
-    return String::format("%g", (timerFireDate - now).seconds());
+    return String::deprecatedFormat("%g", (timerFireDate - now).seconds());
 }
 
 static const float gFontSize = 14;
index 0207538..eaa748c 100644 (file)
@@ -78,7 +78,7 @@ static String snapOffsetsToString(const Vector<LayoutUnit>& snapOffsets)
     StringBuilder s;
     s.append("[ ");
     for (auto offset : snapOffsets)
-        s.append(String::format("%.1f ", offset.toFloat()));
+        s.append(String::deprecatedFormat("%.1f ", offset.toFloat()));
 
     s.append("]");
     return s.toString();
@@ -89,14 +89,14 @@ static String snapOffsetRangesToString(const Vector<ScrollOffsetRange<LayoutUnit
     StringBuilder s;
     s.append("[ ");
     for (auto range : ranges)
-        s.append(String::format("(%.1f, %.1f) ", range.start.toFloat(), range.end.toFloat()));
+        s.append(String::deprecatedFormat("(%.1f, %.1f) ", range.start.toFloat(), range.end.toFloat()));
     s.append("]");
     return s.toString();
 }
 
 static String snapPortOrAreaToString(const LayoutRect& rect)
 {
-    return String::format("{{%.1f, %.1f} {%.1f, %.1f}}", rect.x().toFloat(), rect.y().toFloat(), rect.width().toFloat(), rect.height().toFloat());
+    return String::deprecatedFormat("{{%.1f, %.1f} {%.1f, %.1f}}", rect.x().toFloat(), rect.y().toFloat(), rect.width().toFloat(), rect.height().toFloat());
 }
 
 #endif
index db70788..94b9850 100644 (file)
@@ -693,11 +693,11 @@ String DateComponents::toStringForTime(SecondFormat format) const
         FALLTHROUGH; // To None.
 #endif
     case None:
-        return String::format("%02d:%02d", m_hour, m_minute);
+        return String::deprecatedFormat("%02d:%02d", m_hour, m_minute);
     case Second:
-        return String::format("%02d:%02d:%02d", m_hour, m_minute, m_second);
+        return String::deprecatedFormat("%02d:%02d:%02d", m_hour, m_minute, m_second);
     case Millisecond:
-        return String::format("%02d:%02d:%02d.%03d", m_hour, m_minute, m_second, m_millisecond);
+        return String::deprecatedFormat("%02d:%02d:%02d.%03d", m_hour, m_minute, m_second, m_millisecond);
     }
 }
 
@@ -705,19 +705,19 @@ String DateComponents::toString(SecondFormat format) const
 {
     switch (m_type) {
     case Date:
-        return String::format("%04d-%02d-%02d", m_year, m_month + 1, m_monthDay);
+        return String::deprecatedFormat("%04d-%02d-%02d", m_year, m_month + 1, m_monthDay);
     case DateTime:
-        return String::format("%04d-%02d-%02dT", m_year, m_month + 1, m_monthDay)
+        return String::deprecatedFormat("%04d-%02d-%02dT", m_year, m_month + 1, m_monthDay)
             + toStringForTime(format) + String("Z");
     case DateTimeLocal:
-        return String::format("%04d-%02d-%02dT", m_year, m_month + 1, m_monthDay)
+        return String::deprecatedFormat("%04d-%02d-%02dT", m_year, m_month + 1, m_monthDay)
             + toStringForTime(format);
     case Month:
-        return String::format("%04d-%02d", m_year, m_month + 1);
+        return String::deprecatedFormat("%04d-%02d", m_year, m_month + 1);
     case Time:
         return toStringForTime(format);
     case Week:
-        return String::format("%04d-W%02d", m_year, m_week);
+        return String::deprecatedFormat("%04d-W%02d", m_year, m_week);
     case Invalid:
         break;
     }
index b0550cf..7ff4fc3 100644 (file)
@@ -43,7 +43,7 @@
 
 namespace WebCore {
 
-// We can't use String::format for two reasons:
+// We can't use String::deprecatedFormat for two reasons:
 //  1) It doesn't handle non-ASCII characters in the format string.
 //  2) It doesn't handle the %2$d syntax.
 // Note that because |format| is used as the second parameter to va_start, it cannot be a reference
index 8c972d6..6723d50 100644 (file)
@@ -194,13 +194,13 @@ String TimingFunction::cssText() const
             return "ease-out";
         if (function.x1() == 0.42 && !function.y1() && function.x2() == 0.58 && function.y2() == 1.0)
             return "ease-in-out";
-        return String::format("cubic-bezier(%g, %g, %g, %g)", function.x1(), function.y1(), function.x2(), function.y2());
+        return String::deprecatedFormat("cubic-bezier(%g, %g, %g, %g)", function.x1(), function.y1(), function.x2(), function.y2());
     }
 
     if (m_type == TimingFunction::StepsFunction) {
         auto& function = downcast<StepsTimingFunction>(*this);
         if (!function.stepAtStart())
-            return String::format("steps(%d)", function.numberOfSteps());
+            return String::deprecatedFormat("steps(%d)", function.numberOfSteps());
     }
 
     TextStream stream;
index f65cde3..1e71525 100644 (file)
@@ -176,7 +176,7 @@ bool HRTFElevation::calculateKernelsForAzimuthElevation(int azimuth, int elevati
     AudioChannel* leftEarImpulseResponse = response->channel(AudioBus::ChannelLeft);
     AudioChannel* rightEarImpulseResponse = response->channel(AudioBus::ChannelRight);
 #else
-    String resourceName = String::format("IRC_%s_C_R0195_T%03d_P%03d", subjectName.utf8().data(), azimuth, positiveElevation);
+    String resourceName = String::deprecatedFormat("IRC_%s_C_R0195_T%03d_P%03d", subjectName.utf8().data(), azimuth, positiveElevation);
 
     RefPtr<AudioBus> impulseResponse(AudioBus::loadPlatformResource(resourceName.utf8().data(), sampleRate));
 
index a7821f7..8cc320f 100644 (file)
@@ -480,7 +480,7 @@ String keyIdentifierForCharCode(unichar charCode)
             // FIXME: We should use something other than the vendor-area Unicode values for the above keys.
             // For now, just fall through to the default.
         default:
-            return String::format("U+%04X", toASCIIUpper(charCode));
+            return String::deprecatedFormat("U+%04X", toASCIIUpper(charCode));
     }
 }
 
index 7c1ee8f..d32d686 100644 (file)
@@ -57,7 +57,7 @@ HIDGamepad::HIDGamepad(IOHIDDeviceRef hidDevice, unsigned index)
 
     // Currently the spec has no formatting for the id string.
     // This string formatting matches Firefox.
-    m_id = String::format("%x-%x-%s", vendorID, productID, productName.utf8().data());
+    m_id = String::deprecatedFormat("%x-%x-%s", vendorID, productID, productName.utf8().data());
 
     initElements();
 }
index 1621a88..caf0bfd 100644 (file)
@@ -58,7 +58,7 @@ static const String platformVersionForUAString()
 #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(String::deprecatedFormat("%s %s", name.sysname, name.machine));
     return uaOSVersion;
 #else
     // We will always claim to be Safari in Intel Mac OS X, since Safari without
index 3170103..02e1819 100644 (file)
@@ -392,8 +392,8 @@ String Color::nameForRenderTreeAsText() const
 {
     // FIXME: Handle ExtendedColors.
     if (alpha() < 0xFF)
-        return String::format("#%02X%02X%02X%02X", red(), green(), blue(), alpha());
-    return String::format("#%02X%02X%02X", red(), green(), blue());
+        return String::deprecatedFormat("#%02X%02X%02X%02X", red(), green(), blue(), alpha());
+    return String::deprecatedFormat("#%02X%02X%02X", red(), green(), blue());
 }
 
 Color Color::light() const
index a0cf8c6..777976f 100644 (file)
@@ -138,7 +138,7 @@ private:
 namespace WTF {
 
 template<> struct ValueToString<WebCore::FloatPolygonEdge*> {
-    static String string(const WebCore::FloatPolygonEdge* edge) { return String::format("%p (%f,%f %f,%f)", edge, edge->vertex1().x(), edge->vertex1().y(), edge->vertex2().x(), edge->vertex2().y()); }
+    static String string(const WebCore::FloatPolygonEdge* edge) { return String::deprecatedFormat("%p (%f,%f %f,%f)", edge, edge->vertex1().x(), edge->vertex1().y(), edge->vertex2().x(), edge->vertex2().y()); }
 };
 
 }
index 6e48fda..7831699 100644 (file)
@@ -180,7 +180,7 @@ int AVTrackPrivateAVFObjCImpl::index() const
 AtomicString AVTrackPrivateAVFObjCImpl::id() const
 {
     if (m_assetTrack)
-        return String::format("%d", [m_assetTrack trackID]);
+        return String::deprecatedFormat("%d", [m_assetTrack trackID]);
     if (m_mediaSelectionOption)
         return [[m_mediaSelectionOption->avMediaSelectionOption() optionID] stringValue];
     ASSERT_NOT_REACHED();
index d5a806d..55fdaae 100644 (file)
@@ -84,7 +84,7 @@ protected:
     }
     MediaSampleAVFObjC(CMSampleBufferRef sample, int trackID)
         : m_sample(sample)
-        , m_id(String::format("%d", trackID))
+        , m_id(String::deprecatedFormat("%d", trackID))
     {
     }
     MediaSampleAVFObjC(CMSampleBufferRef sample, VideoRotation rotation, bool mirrored)
index 293806c..a42027e 100644 (file)
@@ -485,9 +485,9 @@ void GraphicsLayerCA::setName(const String& name)
     String caLayerDescription;
 
     if (!m_layer->isPlatformCALayerRemote())
-        caLayerDescription = String::format("CALayer(%p) ", m_layer->platformLayer());
+        caLayerDescription = String::deprecatedFormat("CALayer(%p) ", m_layer->platformLayer());
 
-    GraphicsLayer::setName(caLayerDescription + String::format("GraphicsLayer(%p, %llu) ", this, primaryLayerID()) + name);
+    GraphicsLayer::setName(caLayerDescription + String::deprecatedFormat("GraphicsLayer(%p, %llu) ", this, primaryLayerID()) + name);
 #else
     GraphicsLayer::setName(name);
 #endif
@@ -1119,7 +1119,7 @@ void GraphicsLayerCA::setContentsToSolidColor(const Color& color)
             m_contentsLayerPurpose = ContentsLayerPurpose::BackgroundColor;
             m_contentsLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this);
 #if ENABLE(TREE_DEBUGGING)
-            m_contentsLayer->setName(String::format("contents color %llu", m_contentsLayer->layerID()));
+            m_contentsLayer->setName(String::deprecatedFormat("contents color %llu", m_contentsLayer->layerID()));
 #else
             m_contentsLayer->setName("contents color");
 #endif
@@ -1521,7 +1521,7 @@ void GraphicsLayerCA::recursiveCommitChanges(const CommitState& commitState, con
         static NeverDestroyed<Color> washBorderColor(255, 0, 0, 100);
         
         m_visibleTileWashLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this);
-        String name = String::format("Visible Tile Wash Layer %p", m_visibleTileWashLayer->platformLayer());
+        String name = String::deprecatedFormat("Visible Tile Wash Layer %p", m_visibleTileWashLayer->platformLayer());
         m_visibleTileWashLayer->setName(name);
         m_visibleTileWashLayer->setAnchorPoint(FloatPoint3D(0, 0, 0));
         m_visibleTileWashLayer->setBorderColor(washBorderColor);
@@ -2522,7 +2522,7 @@ void GraphicsLayerCA::updateContentsImage()
         if (!m_contentsLayer.get()) {
             m_contentsLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this);
 #if ENABLE(TREE_DEBUGGING)
-            m_contentsLayer->setName(String::format("contents image %llu", m_contentsLayer->layerID()));
+            m_contentsLayer->setName(String::deprecatedFormat("contents image %llu", m_contentsLayer->layerID()));
 #else
             m_contentsLayer->setName("contents image");
 #endif
@@ -2628,7 +2628,7 @@ void GraphicsLayerCA::updateContentsRects()
             m_contentsClippingLayer = createPlatformCALayer(PlatformCALayer::LayerTypeLayer, this);
             m_contentsClippingLayer->setAnchorPoint(FloatPoint());
 #if ENABLE(TREE_DEBUGGING)
-            m_contentsClippingLayer->setName(String::format("contents clipping %llu", m_contentsClippingLayer->layerID()));
+            m_contentsClippingLayer->setName(String::deprecatedFormat("contents clipping %llu", m_contentsClippingLayer->layerID()));
 #else
             m_contentsClippingLayer->setName("contents clipping");
 #endif
@@ -3111,7 +3111,7 @@ bool GraphicsLayerCA::appendToUncommittedAnimations(const KeyframeValueList& val
     for (int internalFilterPropertyIndex = 0; internalFilterPropertyIndex < numAnimatedProperties; ++internalFilterPropertyIndex) {
         bool valuesOK;
         RefPtr<PlatformCAAnimation> caAnimation;
-        String keyPath = String::format("filters.filter_%d.%s", animationIndex, PlatformCAFilters::animatedFilterPropertyName(filterOp, internalFilterPropertyIndex));
+        String keyPath = String::deprecatedFormat("filters.filter_%d.%s", animationIndex, PlatformCAFilters::animatedFilterPropertyName(filterOp, internalFilterPropertyIndex));
         
         if (isKeyframe) {
             caAnimation = createKeyframeAnimation(animation, keyPath, false);
@@ -3869,7 +3869,7 @@ RefPtr<PlatformCALayer> GraphicsLayerCA::findOrMakeClone(CloneID cloneID, Platfo
     } else {
         resultLayer = cloneLayer(sourceLayer, cloneLevel);
 #if ENABLE(TREE_DEBUGGING)
-        resultLayer->setName(String::format("clone %d of %llu", cloneID[0U], sourceLayer->layerID()));
+        resultLayer->setName(String::deprecatedFormat("clone %d of %llu", cloneID[0U], sourceLayer->layerID()));
 #else
         resultLayer->setName("clone of " + m_name);
 #endif
index 62353e4..7f298be 100644 (file)
@@ -327,7 +327,7 @@ static void simpleBusMessageCallback(GstBus*, GstMessage* message, GstBin* pipel
     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 = String::deprecatedFormat("%s_error", GST_OBJECT_NAME(pipeline));
             GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS(pipeline, GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.utf8().data());
         }
         break;
@@ -341,7 +341,7 @@ static void simpleBusMessageCallback(GstBus*, GstMessage* message, GstBin* pipel
                 gst_element_state_get_name(newState),
                 gst_element_state_get_name(pending));
 
-            WTF::String dotFileName = String::format("%s_%s_%s",
+            WTF::String dotFileName = String::deprecatedFormat("%s_%s_%s",
                 GST_OBJECT_NAME(pipeline),
                 gst_element_state_get_name(oldState),
                 gst_element_state_get_name(newState));
index c623501..67dae79 100644 (file)
@@ -306,7 +306,7 @@ void MediaPlayerPrivateGStreamer::load(MediaStreamPrivate& stream)
 {
 #if GST_CHECK_VERSION(1, 10, 0)
     m_streamPrivate = &stream;
-    auto pipelineName = String::format("mediastream_%s_%p",
+    auto pipelineName = String::deprecatedFormat("mediastream_%s_%p",
         (stream.hasCaptureVideoSource() || stream.hasCaptureAudioSource()) ? "Local" : "Remote", this);
 
     loadFull(String("mediastream://") + stream.id(), "playbin3", pipelineName);
@@ -1217,7 +1217,7 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message)
         // 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()),
+        CString dotFileName = String::deprecatedFormat("%s.%s_%s", 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());
 
@@ -2508,7 +2508,7 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin(const gchar* playbinName, con
     // gst_element_factory_make() returns a floating reference so
     // we should not adopt.
     setPipeline(gst_element_factory_make(playbinName,
-        pipelineName.isEmpty() ? String::format("play_%p", this).utf8().data() : pipelineName.utf8().data()));
+        pipelineName.isEmpty() ? String::deprecatedFormat("play_%p", this).utf8().data() : pipelineName.utf8().data()));
     setStreamVolumeElement(GST_STREAM_VOLUME(m_pipeline.get()));
 
     GST_INFO("Using legacy playbin element: %s", boolForPrinting(m_isLegacyPlaybin));
index fd186af..eae9550 100644 (file)
@@ -340,7 +340,7 @@ void AppendPipeline::handleStateChangeMessage(GstMessage* message)
         CString sourceBufferType = String(m_sourceBufferPrivate->type().raw())
             .replace("/", "_").replace(" ", "_")
             .replace("\"", "").replace("\'", "").utf8();
-        CString dotFileName = String::format("webkit-append-%s-%s_%s",
+        CString dotFileName = String::deprecatedFormat("webkit-append-%s-%s_%s",
             sourceBufferType.data(),
             gst_element_state_get_name(currentState),
             gst_element_state_get_name(newState)).utf8();
@@ -760,7 +760,7 @@ void AppendPipeline::resetPipeline()
     {
         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 = String::deprecatedFormat("reset-pipeline-%d", ++i);
         gst_debug_bin_to_dot_file(GST_BIN(m_pipeline.get()), GST_DEBUG_GRAPH_SHOW_ALL, dotFileName.utf8().data());
     }
 #endif
index dd22fb2..578cb30 100644 (file)
@@ -149,7 +149,7 @@ void MediaPlayerPrivateGStreamerMSE::load(const String& urlString)
 void MediaPlayerPrivateGStreamerMSE::load(const String& url, MediaSourcePrivateClient* mediaSource)
 {
     m_mediaSource = mediaSource;
-    load(String::format("mediasource%s", url.utf8().data()));
+    load(String::deprecatedFormat("mediasource%s", url.utf8().data()));
 }
 
 void MediaPlayerPrivateGStreamerMSE::pause()
@@ -272,7 +272,7 @@ bool MediaPlayerPrivateGStreamerMSE::doSeek()
         || !m_gstSeekCompleted) {
         CString reason = "Unknown reason";
         if (getStateResult == GST_STATE_CHANGE_ASYNC) {
-            reason = String::format("In async change %s --> %s",
+            reason = String::deprecatedFormat("In async change %s --> %s",
                 gst_element_state_get_name(state),
                 gst_element_state_get_name(newState)).utf8();
         } else if (state < GST_STATE_PAUSED)
index 8e6095c..f0ac7bb 100644 (file)
@@ -67,7 +67,7 @@ static bool encodeImage(cairo_surface_t* surface, const String& mimeType, std::o
 
     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::deprecatedFormat("%d", 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);
index 2dd8bfa..09a1e5f 100644 (file)
@@ -832,7 +832,7 @@ String PlatformKeyboardEvent::keyIdentifierForGdkKeyCode(unsigned keyCode)
         case GDK_Tab:
             return "U+0009";
         default:
-            return String::format("U+%04X", gdk_keyval_to_unicode(gdk_keyval_to_upper(keyCode)));
+            return String::deprecatedFormat("U+%04X", gdk_keyval_to_unicode(gdk_keyval_to_upper(keyCode)));
     }
 }
 
index 0d57b23..d4edd15 100644 (file)
@@ -69,7 +69,7 @@ CaptureSourceOrError GStreamerAudioCaptureSource::create(const String& deviceID,
 {
     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 = String::deprecatedFormat("GStreamerAudioCaptureSource::create(): GStreamer did not find the device: %s.", deviceID.utf8().data());
         return CaptureSourceOrError(WTFMove(errorMessage));
     }
 
index ffdae4e..7c00b71 100644 (file)
@@ -345,7 +345,7 @@ static GstFlowReturn webkitMediaStreamSrcChain(GstPad* pad, GstObject* parent, G
 
 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 = String::deprecatedFormat("src_%u", 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));
 
index 5a9dfb5..7438e9a 100644 (file)
@@ -70,7 +70,7 @@ CaptureSourceOrError GStreamerVideoCaptureSource::create(const String& deviceID,
 {
     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 = String::deprecatedFormat("GStreamerVideoCaptureSource::create(): GStreamer did not find the device: %s.", deviceID.utf8().data());
         return CaptureSourceOrError(WTFMove(errorMessage));
     }
 
index 21649c2..416ce39 100644 (file)
@@ -98,7 +98,7 @@ public:
 
     GstElement* makeElement(const gchar* factoryName)
     {
-        auto name = String::format("%s_enc_%s_%p", Name(), factoryName, this);
+        auto name = String::deprecatedFormat("%s_enc_%s_%p", Name(), factoryName, this);
         auto elem = gst_element_factory_make(factoryName, name.utf8().data());
 
         return elem;
index 9c41e1c..2739614 100644 (file)
@@ -337,18 +337,18 @@ void MockRealtimeVideoSource::drawText(GraphicsContext& context)
     FloatPoint timeLocation(size.width() * .05, size.height() * .15);
     context.setFillColor(Color::white);
     context.setTextDrawingMode(TextModeFill);
-    String string = String::format("%02u:%02u:%02u.%03u", hours, minutes, seconds, milliseconds % 1000);
+    String string = String::deprecatedFormat("%02u:%02u:%02u.%03u", hours, minutes, seconds, milliseconds % 1000);
     context.drawText(timeFont, TextRun((StringView(string))), timeLocation);
 
-    string = String::format("%06u", m_frameNumber++);
+    string = String::deprecatedFormat("%06u", m_frameNumber++);
     timeLocation.move(0, m_baseFontSize);
     context.drawText(timeFont, TextRun((StringView(string))), timeLocation);
 
     FloatPoint statsLocation(size.width() * .65, size.height() * .75);
-    string = String::format("Frame rate: %ffps", frameRate());
+    string = String::deprecatedFormat("Frame rate: %ffps", frameRate());
     context.drawText(statsFont, TextRun((StringView(string))), statsLocation);
 
-    string = String::format("Size: %u x %u", size.width(), size.height());
+    string = String::deprecatedFormat("Size: %u x %u", size.width(), size.height());
     statsLocation.move(0, m_statsFontSize);
     context.drawText(statsFont, TextRun((StringView(string))), statsLocation);
 
@@ -371,7 +371,7 @@ void MockRealtimeVideoSource::drawText(GraphicsContext& context)
             camera = "Unknown";
             break;
         }
-        string = String::format("Camera: %s", camera);
+        string = String::deprecatedFormat("Camera: %s", camera);
         statsLocation.move(0, m_statsFontSize);
         context.drawText(statsFont, TextRun((StringView(string))), statsLocation);
     } else {
index 7f705cc..3b0f4d6 100644 (file)
@@ -49,7 +49,7 @@ public:
 private:
     MockMediaSample(const MockSampleBox& box)
         : m_box(box)
-        , m_id(String::format("%d", box.trackID()))
+        , m_id(String::deprecatedFormat("%d", box.trackID()))
     {
     }
 
index 00b90c4..453d7b3 100644 (file)
@@ -127,8 +127,8 @@ String ParsedContentRange::headerValue() const
     if (!m_isValid)
         return String();
     if (m_instanceLength == UnknownLength)
-        return String::format("bytes %" PRId64 "-%" PRId64 "/*", m_firstBytePosition, m_lastBytePosition);
-    return String::format("bytes %" PRId64 "-%" PRId64 "/%" PRId64, m_firstBytePosition, m_lastBytePosition, m_instanceLength);
+        return String::deprecatedFormat("bytes %" PRId64 "-%" PRId64 "/*", m_firstBytePosition, m_lastBytePosition);
+    return String::deprecatedFormat("bytes %" PRId64 "-%" PRId64 "/%" PRId64, m_firstBytePosition, m_lastBytePosition, m_instanceLength);
 }
 
 }
index 8119fd5..68b3796 100644 (file)
@@ -137,7 +137,7 @@ static std::unique_ptr<NetworkStorageSession>& defaultNetworkStorageSession()
 void NetworkStorageSession::switchToNewTestingSession()
 {
     // Session name should be short enough for shared memory region name to be under the limit, otehrwise sandbox rules won't work (see <rdar://problem/13642852>).
-    String sessionName = String::format("WebKit Test-%u", static_cast<uint32_t>(getCurrentProcessID()));
+    String sessionName = String::deprecatedFormat("WebKit Test-%u", static_cast<uint32_t>(getCurrentProcessID()));
 
     RetainPtr<CFURLStorageSessionRef> session;
 #if PLATFORM(COCOA)
index a16050a..bb36e59 100644 (file)
@@ -46,7 +46,7 @@ static const char notOpenErrorMessage[] = "database is not open";
 static void unauthorizedSQLFunction(sqlite3_context *context, int, sqlite3_value **)
 {
     const char* functionName = (const char*)sqlite3_user_data(context);
-    String errorMessage = String::format("Function %s is unauthorized", functionName);
+    String errorMessage = String::deprecatedFormat("Function %s is unauthorized", functionName);
     sqlite3_result_error(context, errorMessage.utf8().data(), -1);
 }
 
index 0874325..8641b63 100644 (file)
@@ -158,7 +158,7 @@ void DateTimeStringBuilder::visitField(DateTimeFormat::FieldType fieldType, int
             appendNumber(m_date.second(), numberOfPatternCharacters);
         else {
             double second = m_date.second() + m_date.millisecond() / 1000.0;
-            String zeroPaddedSecondString = zeroPadString(String::format("%.03f", second), numberOfPatternCharacters + 4);
+            String zeroPaddedSecondString = zeroPadString(String::deprecatedFormat("%.03f", second), numberOfPatternCharacters + 4);
             m_builder.append(m_localizer.convertToLocalizedNumber(zeroPaddedSecondString));
         }
         return;
index a939f2b..2dcd2e4 100644 (file)
@@ -46,7 +46,7 @@ GDIObjectCounter::GDIObjectCounter(const String& identifier)
 
 GDIObjectCounter::GDIObjectCounter(const String& className, void* instance)
 {
-    init(String::format("%s (%p)", className.latin1().data(), instance));
+    init(String::deprecatedFormat("%s (%p)", className.latin1().data(), instance));
 }
 
 void GDIObjectCounter::init(const String& identifier)
index a5da187..21d5631 100644 (file)
@@ -142,7 +142,7 @@ static String keyIdentifierForWindowsKeyCode(unsigned short keyCode)
         case VK_DELETE:
             return "U+007F";
         default:
-            return String::format("U+%04X", toASCIIUpper(keyCode));
+            return String::deprecatedFormat("U+%04X", toASCIIUpper(keyCode));
     }
 }
 
index 11e68a7..173641a 100644 (file)
@@ -185,7 +185,7 @@ namespace WTF {
 template<> struct ValueToString<WebCore::FloatingObject*> {
     static String string(const WebCore::FloatingObject* floatingObject)
     {
-        return String::format("%p (%ix%i %ix%i)", floatingObject, floatingObject->frameRect().x().toInt(), floatingObject->frameRect().y().toInt(), floatingObject->frameRect().maxX().toInt(), floatingObject->frameRect().maxY().toInt());
+        return String::deprecatedFormat("%p (%ix%i %ix%i)", floatingObject, floatingObject->frameRect().x().toInt(), floatingObject->frameRect().y().toInt(), floatingObject->frameRect().maxX().toInt(), floatingObject->frameRect().maxY().toInt());
     }
 };
 
index f14d085..f39983e 100644 (file)
@@ -280,7 +280,7 @@ protected:
 namespace WTF {
 
 template <> struct ValueToString<WebCore::RenderFragmentContainer*> {
-    static String string(const WebCore::RenderFragmentContainer* value) { return String::format("%p", value); }
+    static String string(const WebCore::RenderFragmentContainer* value) { return String::deprecatedFormat("%p", value); }
 };
 
 template <> struct ValueToString<WeakPtr<WebCore::RenderFragmentContainer>> {
index 7ec1ca4..4d057bf 100644 (file)
@@ -835,12 +835,12 @@ void RenderLayerCompositor::logLayerInfo(const RenderLayer& layer, int depth)
     absoluteBounds.move(layer.offsetFromAncestor(m_renderView.layer()));
     
     StringBuilder logString;
-    logString.append(String::format("%*p id %" PRIu64 " (%.3f,%.3f-%.3f,%.3f) %.2fKB", 12 + depth * 2, &layer, backing->graphicsLayer()->primaryLayerID(),
+    logString.append(String::deprecatedFormat("%*p id %" PRIu64 " (%.3f,%.3f-%.3f,%.3f) %.2fKB", 12 + depth * 2, &layer, backing->graphicsLayer()->primaryLayerID(),
         absoluteBounds.x().toFloat(), absoluteBounds.y().toFloat(), absoluteBounds.maxX().toFloat(), absoluteBounds.maxY().toFloat(),
         backing->backingStoreMemoryEstimate() / 1024));
     
     if (!layer.renderer().style().hasAutoZIndex())
-        logString.append(String::format(" z-index: %d", layer.renderer().style().zIndex())); 
+        logString.append(String::deprecatedFormat(" z-index: %d", layer.renderer().style().zIndex())); 
 
     logString.appendLiteral(" (");
     logString.append(logReasonsForCompositing(layer));
index 89d6fbf..f07f518 100644 (file)
@@ -551,12 +551,12 @@ String RenderTheme::formatMediaControlsTime(float time) const
     seconds %= 60;
     if (hours) {
         if (hours > 9)
-            return String::format("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
+            return String::deprecatedFormat("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
 
-        return String::format("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
+        return String::deprecatedFormat("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
     }
 
-    return String::format("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds);
+    return String::deprecatedFormat("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds);
 }
 
 String RenderTheme::formatMediaControlsCurrentTime(float currentTime, float /*duration*/) const
index a3e96ed..d3e4529 100644 (file)
@@ -609,7 +609,7 @@ ExceptionOr<double> Internals::svgAnimationsInterval(SVGSVGElement& element) con
 
 String Internals::address(Node& node)
 {
-    return String::format("%p", &node);
+    return String::deprecatedFormat("%p", &node);
 }
 
 bool Internals::nodeNeedsStyleRecalc(Node& node)
index 770c9d6..e43dc47 100644 (file)
@@ -201,7 +201,7 @@ String RegistrationDatabase::ensureValidRecordsTable()
         // If there is no Records table at all, create it and then bail.
         if (sqliteResult == SQLITE_DONE) {
             if (!m_database->executeCommand(recordsTableSchema()))
-                return String::format("Could not create Records table in database (%i) - %s", m_database->lastError(), m_database->lastErrorMsg());
+                return String::deprecatedFormat("Could not create Records table in database (%i) - %s", m_database->lastError(), m_database->lastErrorMsg());
             return { };
         }
 
@@ -358,7 +358,7 @@ String RegistrationDatabase::importRecords()
 
     SQLiteStatement sql(*m_database, "SELECT * FROM Records;"_s);
     if (sql.prepare() != SQLITE_OK)
-        return String::format("Failed to prepare statement to retrieve registrations from records table (%i) - %s", m_database->lastError(), m_database->lastErrorMsg());
+        return String::deprecatedFormat("Failed to prepare statement to retrieve registrations from records table (%i) - %s", m_database->lastError(), m_database->lastErrorMsg());
 
     int result = sql.step();
 
@@ -408,7 +408,7 @@ String RegistrationDatabase::importRecords()
     }
 
     if (result != SQLITE_DONE)
-        return String::format("Failed to import at least one registration from records table (%i) - %s", m_database->lastError(), m_database->lastErrorMsg());
+        return String::deprecatedFormat("Failed to import at least one registration from records table (%i) - %s", m_database->lastError(), m_database->lastErrorMsg());
 
     return { };
 }
index 53449b4..a0b073e 100644 (file)
@@ -1,3 +1,43 @@
+2018-08-01  Tomas Popela  <tpopela@redhat.com>
+
+        [WTF] Rename String::format to String::deprecatedFormat
+        https://bugs.webkit.org/show_bug.cgi?id=188191
+
+        Reviewed by Darin Adler.
+
+        It should be replaced with string concatenation.
+
+        * NetworkProcess/soup/NetworkProcessSoup.cpp:
+        (WebKit::buildAcceptLanguages):
+        * Platform/IPC/win/ConnectionWin.cpp:
+        (IPC::Connection::createServerAndClientIdentifiers):
+        * Shared/WebMemorySampler.cpp:
+        (WebKit::WebMemorySampler::writeHeaders):
+        * Shared/win/WebEventFactory.cpp:
+        (WebKit::keyIdentifierFromEvent):
+        * Shared/wpe/WebEventFactory.cpp:
+        (WebKit::identifierStringForKeyEvent):
+        * UIProcess/API/APINavigation.cpp:
+        (API::Navigation::loggingString const):
+        * UIProcess/API/glib/IconDatabase.cpp:
+        (WebKit::IconDatabase::performURLImport):
+        * UIProcess/Cocoa/ViewGestureController.cpp:
+        (WebKit::ViewGestureController::SnapshotRemovalTracker::startWatchdog):
+        * UIProcess/SuspendedPageProxy.cpp:
+        (WebKit::SuspendedPageProxy::loggingString const):
+        * UIProcess/WebBackForwardList.cpp:
+        (WebKit::WebBackForwardList::loggingString):
+        * UIProcess/WebInspectorUtilities.cpp:
+        (WebKit::inspectorPageGroupIdentifierForPage):
+        * UIProcess/WebProcessPool.cpp:
+        (WebKit::WebProcessPool::processDidFinishLaunching):
+        (WebKit::WebProcessPool::startMemorySampler):
+        * UIProcess/gtk/InputMethodFilter.cpp:
+        (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting):
+        (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting):
+        (WebKit::InputMethodFilter::logConfirmCompositionForTesting):
+        (WebKit::InputMethodFilter::logSetPreeditForTesting):
+
 2018-08-01  Tim Horton  <timothy_horton@apple.com>
 
         Using the keyboard arrow keys to scroll a webpage is very slow, not smooth, takes too long
index e39b3d8..b00c75f 100644 (file)
@@ -84,7 +84,7 @@ static CString buildAcceptLanguages(const Vector<String>& languages)
         if (quality > 0 && quality < 100) {
             char buffer[8];
             g_ascii_formatd(buffer, 8, "%.2f", quality / 100.0);
-            builder.append(String::format(";q=%s", buffer));
+            builder.append(String::deprecatedFormat(";q=%s", buffer));
         }
     }
 
index 3c0e850..b8b57fe 100644 (file)
@@ -43,7 +43,7 @@ bool Connection::createServerAndClientIdentifiers(HANDLE& serverIdentifier, HAND
 
     do {
         unsigned uniqueID = randomNumber() * std::numeric_limits<unsigned>::max();
-        pipeName = String::format("\\\\.\\pipe\\com.apple.WebKit.%x", uniqueID);
+        pipeName = String::deprecatedFormat("\\\\.\\pipe\\com.apple.WebKit.%x", uniqueID);
 
         serverIdentifier = ::CreateNamedPipe(pipeName.charactersWithNullTermination().data(),
             PIPE_ACCESS_DUPLEX | FILE_FLAG_FIRST_PIPE_INSTANCE | FILE_FLAG_OVERLAPPED,
index f6c792c..209c713 100644 (file)
@@ -143,7 +143,7 @@ void WebMemorySampler::initializeSandboxedLogFile(SandboxExtension::Handle&& sam
 
 void WebMemorySampler::writeHeaders()
 {
-    String processDetails = String::format("Process: %s Pid: %d\n", processName().utf8().data(), getCurrentProcessID());
+    String processDetails = String::deprecatedFormat("Process: %s Pid: %d\n", processName().utf8().data(), getCurrentProcessID());
 
     CString utf8String = processDetails.utf8();
     FileSystem::writeToFile(m_sampleLogFile, utf8String.data(), utf8String.length());
index 0d328c3..0b9eb74 100644 (file)
@@ -324,7 +324,7 @@ static String keyIdentifierFromEvent(WPARAM wparam, WebEvent::Type type)
     case VK_DELETE:
         return String("U+007F"); // Standard says that DEL becomes U+007F.
     default:
-        return String::format("U+%04X", toASCIIUpper(keyCode));
+        return String::deprecatedFormat("U+%04X", toASCIIUpper(keyCode));
     }
 }
 
index 7ceaf66..381d49c 100644 (file)
@@ -69,7 +69,7 @@ static String identifierStringForKeyEvent(struct wpe_input_keyboard_event* event
     if (identifier)
         return String(identifier);
 
-    return String::format("U+%04X", event->unicode);
+    return String::deprecatedFormat("U+%04X", event->unicode);
 }
 
 WallTime wallTimeForEventTime(uint64_t timestamp)
index 53ddbb6..e7cb2a0 100644 (file)
@@ -78,7 +78,7 @@ void Navigation::appendRedirectionURL(const URL& url)
 #if !LOG_DISABLED
 const char* Navigation::loggingString() const
 {
-    return debugString("Most recent URL: ", m_currentRequest.url().string(), " Back/forward list item URL: '", m_targetItem ? m_targetItem->url() : String { }, String::format("' (%p)", m_targetItem.get()));
+    return debugString("Most recent URL: ", m_currentRequest.url().string(), " Back/forward list item URL: '", m_targetItem ? m_targetItem->url() : String { }, String::deprecatedFormat("' (%p)", m_targetItem.get()));
 }
 #endif
 
index 86c2cf6..1da00fb 100644 (file)
@@ -1084,7 +1084,7 @@ void IconDatabase::performURLImport()
     // 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 = String::deprecatedFormat("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()));
 
     SQLiteStatement query(m_syncDB, importQuery);
 
index bac287e..d72182a 100644 (file)
@@ -333,7 +333,7 @@ void ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired()
 
 void ViewGestureController::SnapshotRemovalTracker::startWatchdog(Seconds duration)
 {
-    log(String::format("(re)started watchdog timer for %.1f seconds", duration.seconds()));
+    log(String::deprecatedFormat("(re)started watchdog timer for %.1f seconds", duration.seconds()));
     m_watchdogTimer.startOneShot(duration);
 }
 
index 9693792..311f462 100644 (file)
@@ -140,7 +140,7 @@ void SuspendedPageProxy::didReceiveMessage(IPC::Connection&, IPC::Decoder& decod
 #if !LOG_DISABLED
 const char* SuspendedPageProxy::loggingString() const
 {
-    return debugString("(", String::format("%p", this), " page ID ", String::number(m_page.pageID()), ", m_finishedSuspending ", String::number(m_finishedSuspending), ")");
+    return debugString("(", String::deprecatedFormat("%p", this), " page ID ", String::number(m_page.pageID()), ", m_finishedSuspending ", String::number(m_finishedSuspending), ")");
 }
 #endif
 
index 0808a1a..67d3f36 100644 (file)
@@ -481,7 +481,7 @@ void WebBackForwardList::didRemoveItem(WebBackForwardListItem& backForwardListIt
 const char* WebBackForwardList::loggingString()
 {
     StringBuilder builder;
-    builder.append(String::format("WebBackForwardList %p - %zu entries, has current index %s (%zu)", this, m_entries.size(), m_hasCurrentIndex ? "YES" : "NO", m_hasCurrentIndex ? m_currentIndex : 0));
+    builder.append(String::deprecatedFormat("WebBackForwardList %p - %zu entries, has current index %s (%zu)", this, m_entries.size(), m_hasCurrentIndex ? "YES" : "NO", m_hasCurrentIndex ? m_currentIndex : 0));
 
     for (size_t i = 0; i < m_entries.size(); ++i) {
         builder.append("\n");
index c5db401..2604be9 100644 (file)
@@ -57,7 +57,7 @@ unsigned inspectorLevelForPage(WebPageProxy* page)
 
 String inspectorPageGroupIdentifierForPage(WebPageProxy* page)
 {
-    return String::format("__WebInspectorPageGroupLevel%u__", inspectorLevelForPage(page));
+    return String::deprecatedFormat("__WebInspectorPageGroupLevel%u__", inspectorLevelForPage(page));
 }
 
 void trackInspectorPage(WebPageProxy* page)
index f2159ce..8340e50 100644 (file)
@@ -1040,7 +1040,7 @@ void WebProcessPool::processDidFinishLaunching(WebProcessProxy* process)
     if (m_memorySamplerEnabled) {
         SandboxExtension::Handle sampleLogSandboxHandle;        
         WallTime now = WallTime::now();
-        String sampleLogFilePath = String::format("WebProcess%llupid%d", static_cast<unsigned long long>(now.secondsSinceEpoch().seconds()), process->processIdentifier());
+        String sampleLogFilePath = String::deprecatedFormat("WebProcess%llupid%d", static_cast<unsigned long long>(now.secondsSinceEpoch().seconds()), process->processIdentifier());
         sampleLogFilePath = SandboxExtension::createHandleForTemporaryFile(sampleLogFilePath, SandboxExtension::Type::ReadWrite, sampleLogSandboxHandle);
         
         process->send(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, m_memorySamplerInterval), 0);
@@ -1567,7 +1567,7 @@ void WebProcessPool::startMemorySampler(const double interval)
     // For WebProcess
     SandboxExtension::Handle sampleLogSandboxHandle;    
     WallTime now = WallTime::now();
-    String sampleLogFilePath = String::format("WebProcess%llu", static_cast<unsigned long long>(now.secondsSinceEpoch().seconds()));
+    String sampleLogFilePath = String::deprecatedFormat("WebProcess%llu", static_cast<unsigned long long>(now.secondsSinceEpoch().seconds()));
     sampleLogFilePath = SandboxExtension::createHandleForTemporaryFile(sampleLogFilePath, SandboxExtension::Type::ReadWrite, sampleLogSandboxHandle);
     
     sendToAllProcesses(Messages::WebProcess::StartMemorySampler(sampleLogSandboxHandle, sampleLogFilePath, interval));
index 2ef5d9e..96dcb16 100644 (file)
@@ -445,16 +445,16 @@ void InputMethodFilter::logHandleKeyboardEventForTesting(GdkEventKey* event, con
     const char* eventType = event->type == GDK_KEY_RELEASE ? "release" : "press";
     const char* fakedString = faked == EventFaked ? " (faked)" : "";
     if (!eventString.isNull())
-        m_events.append(String::format("sendSimpleKeyEvent type=%s keycode=%x text='%s'%s", eventType, event->keyval, eventString.utf8().data(), fakedString));
+        m_events.append(String::deprecatedFormat("sendSimpleKeyEvent type=%s keycode=%x text='%s'%s", eventType, event->keyval, eventString.utf8().data(), fakedString));
     else
-        m_events.append(String::format("sendSimpleKeyEvent type=%s keycode=%x%s", eventType, event->keyval, fakedString));
+        m_events.append(String::deprecatedFormat("sendSimpleKeyEvent type=%s keycode=%x%s", eventType, event->keyval, fakedString));
 }
 
 void InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting(GdkEventKey* event, ResultsToSend resultsToSend, EventFakedForComposition faked)
 {
     const char* eventType = event->type == GDK_KEY_RELEASE ? "release" : "press";
     const char* fakedString = faked == EventFaked ? " (faked)" : "";
-    m_events.append(String::format("sendKeyEventWithCompositionResults type=%s keycode=%x%s", eventType, event->keyval, fakedString));
+    m_events.append(String::deprecatedFormat("sendKeyEventWithCompositionResults type=%s keycode=%x%s", eventType, event->keyval, fakedString));
 
     if (resultsToSend & Composition && !m_confirmedComposition.isNull())
         logConfirmCompositionForTesting();
@@ -467,12 +467,12 @@ void InputMethodFilter::logConfirmCompositionForTesting()
     if (m_confirmedComposition.isEmpty())
         m_events.append(String("confirmCurrentcomposition"));
     else
-        m_events.append(String::format("confirmComposition '%s'", m_confirmedComposition.utf8().data()));
+        m_events.append(String::deprecatedFormat("confirmComposition '%s'", m_confirmedComposition.utf8().data()));
 }
 
 void InputMethodFilter::logSetPreeditForTesting()
 {
-    m_events.append(String::format("setPreedit text='%s' cursorOffset=%i", m_preedit.utf8().data(), m_cursorOffset));
+    m_events.append(String::deprecatedFormat("setPreedit text='%s' cursorOffset=%i", m_preedit.utf8().data(), m_cursorOffset));
 }
 #endif // ENABLE(API_TESTS)
 
index 58c4a48..b4a03bc 100644 (file)
@@ -1,3 +1,17 @@
+2018-08-01  Tomas Popela  <tpopela@redhat.com>
+
+        [WTF] Rename String::format to String::deprecatedFormat
+        https://bugs.webkit.org/show_bug.cgi?id=188191
+
+        Reviewed by Darin Adler.
+
+        It should be replaced with string concatenation.
+
+        * FullscreenVideoController.cpp:
+        (timeToString):
+        * WebView.cpp:
+        (webKitVersionString):
+
 2018-07-30  Rob Buis  <rbuis@igalia.com>
 
         https://bugs.webkit.org/show_bug.cgi?id=188137
index 1c76f01..e652ebd 100644 (file)
@@ -475,11 +475,11 @@ static String timeToString(float time)
 
     if (hours) {
         if (hours > 9)
-            return String::format("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
-        return String::format("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
+            return String::deprecatedFormat("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
+        return String::deprecatedFormat("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
     }
 
-    return String::format("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds);
+    return String::deprecatedFormat("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds);
 }
 
 void FullscreenVideoController::draw()
index c9e5213..506079f 100644 (file)
@@ -2859,7 +2859,7 @@ static String webKitVersionString()
     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 String::deprecatedFormat("%d.%d", WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION);
 }
 
 const String& WebView::userAgentForKURL(const URL&)
index d4ebb9d..f461306 100644 (file)
@@ -1,3 +1,35 @@
+2018-08-01  Tomas Popela  <tpopela@redhat.com>
+
+        [WTF] Rename String::format to String::deprecatedFormat
+        https://bugs.webkit.org/show_bug.cgi?id=188191
+
+        Reviewed by Darin Adler.
+
+        It should be replaced with string concatenation.
+
+        * DumpRenderTree/win/DumpRenderTree.cpp:
+        (applicationId):
+        (main):
+        * TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
+        (TestWebKitAPI::Util::createURLForResource):
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        (WTR::cacheTestRunnerCallback):
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
+        (WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks):
+        * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
+        (WTR::AccessibilityUIElement::attributedStringForRange):
+        (WTR::AccessibilityUIElement::url):
+        (WTR::stringAtOffset):
+        * WebKitTestRunner/TestController.cpp:
+        (WTR::TestController::didReceiveAuthenticationChallenge):
+        (WTR::TestController::downloadDidFail):
+        (WTR::originUserVisibleName):
+        (WTR::userMediaOriginHash):
+        (WTR::TestController::didNavigateWithNavigationData):
+        (WTR::TestController::didPerformClientRedirect):
+        (WTR::TestController::didPerformServerRedirect):
+        (WTR::TestController::didUpdateHistoryTitle):
+
 2018-08-01  Nan Wang  <n_wang@apple.com>
 
         AX: AOM: Add ARIA IDL Attribute Reflection
index a706752..42b6b9f 100644 (file)
@@ -904,7 +904,7 @@ static void setWebPreferencesForTestOptions(IWebPreferences* preferences, const
 static String applicationId()
 {
     DWORD processId = ::GetCurrentProcessId();
-    return String::format("com.apple.DumpRenderTree.%d", processId);
+    return String::deprecatedFormat("com.apple.DumpRenderTree.%d", processId);
 }
 
 static void setApplicationId()
@@ -1535,8 +1535,8 @@ int main(int argc, const char* argv[])
     // 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 = String::deprecatedFormat("windowStation%d", processId);
+    String desktopName = String::deprecatedFormat("desktop%d", processId);
     HDESK desktop = nullptr;
 
     auto windowsStation = ::CreateWindowStation(windowStationName.charactersWithNullTermination().data(), CWF_CREATE_ONLY, WINSTA_ALL_ACCESS, nullptr);
index 8f755c3..dc86eaf 100644 (file)
@@ -51,7 +51,7 @@ WKStringRef createInjectedBundlePath()
 
 WKURLRef createURLForResource(const char* resource, const char* extension)
 {
-    String filename = String::format("..\\..\\..\\Tools\\TestWebKitAPI\\Tests\\WebKit\\%s.%s", resource, extension);
+    String filename = String::deprecatedFormat("..\\..\\..\\Tools\\TestWebKitAPI\\Tests\\WebKit\\%s.%s", resource, extension);
     auto url = WebCore::URL::fileURLWithFileSystemPath(WebCore::FileSystem::pathByAppendingComponent(moduleDirectory(), filename));
     return WKURLCreateWithUTF8CString(url.string().utf8().data());
 }
index 27f0dd2..0f47c54 100644 (file)
@@ -763,7 +763,7 @@ static void cacheTestRunnerCallback(unsigned index, JSValueRef callback)
         return;
 
     if (callbackMap().contains(index)) {
-        InjectedBundle::singleton().outputText(String::format("FAIL: Tried to install a second TestRunner callback for the same event (id %d)\n\n", index));
+        InjectedBundle::singleton().outputText(String::deprecatedFormat("FAIL: Tried to install a second TestRunner callback for the same event (id %d)\n\n", index));
         return;
     }
 
index bb3ba6a..954bbdd 100644 (file)
@@ -267,7 +267,7 @@ void AccessibilityNotificationHandler::connectAccessibilityCallbacks()
     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 = String::deprecatedFormat("atk_add_global_event_listener failed for signal %s\n", *signalName);
             InjectedBundle::singleton().outputText(message);
             continue;
         }
index 430c022..0f8c22c 100644 (file)
@@ -605,7 +605,7 @@ String attributesOfElement(AccessibilityUIElement* element)
 {
     StringBuilder builder;
 
-    builder.append(String::format("%s\n", element->role()->string().utf8().data()));
+    builder.append(String::deprecatedFormat("%s\n", element->role()->string().utf8().data()));
 
     // For the parent we print its role and its name, if available.
     builder.append("AXParent: ");
@@ -615,40 +615,40 @@ String attributesOfElement(AccessibilityUIElement* element)
         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));
+            builder.append(String::deprecatedFormat(": %s", parentName));
     } else
         builder.append("(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.append(String::deprecatedFormat("AXChildren: %d\n", element->childrenCount()));
+    builder.append(String::deprecatedFormat("AXPosition: { %f, %f }\n", element->x(), element->y()));
+    builder.append(String::deprecatedFormat("AXSize: { %f, %f }\n", element->width(), element->height()));
 
     String title = element->title()->string();
     if (!title.isEmpty())
-        builder.append(String::format("%s\n", title.utf8().data()));
+        builder.append(String::deprecatedFormat("%s\n", title.utf8().data()));
 
     String description = element->description()->string();
     if (!description.isEmpty())
-        builder.append(String::format("%s\n", description.utf8().data()));
+        builder.append(String::deprecatedFormat("%s\n", description.utf8().data()));
 
     String value = element->stringValue()->string();
     if (!value.isEmpty())
-        builder.append(String::format("%s\n", value.utf8().data()));
-
-    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.append(String::deprecatedFormat("%s\n", value.utf8().data()));
+
+    builder.append(String::deprecatedFormat("AXFocusable: %d\n", element->isFocusable()));
+    builder.append(String::deprecatedFormat("AXFocused: %d\n", element->isFocused()));
+    builder.append(String::deprecatedFormat("AXSelectable: %d\n", element->isSelectable()));
+    builder.append(String::deprecatedFormat("AXSelected: %d\n", element->isSelected()));
+    builder.append(String::deprecatedFormat("AXMultiSelectable: %d\n", element->isMultiSelectable()));
+    builder.append(String::deprecatedFormat("AXEnabled: %d\n", element->isEnabled()));
+    builder.append(String::deprecatedFormat("AXExpanded: %d\n", element->isExpanded()));
+    builder.append(String::deprecatedFormat("AXRequired: %d\n", element->isRequired()));
+    builder.append(String::deprecatedFormat("AXChecked: %d\n", element->isChecked()));
 
     String url = element->url()->string();
     if (!url.isEmpty())
-        builder.append(String::format("%s\n", url.utf8().data()));
+        builder.append(String::deprecatedFormat("%s\n", url.utf8().data()));
 
     // We append the ATK specific attributes as a single line at the end.
     builder.append("AXPlatformAttributes: ");
@@ -1786,7 +1786,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::attributedStringForRange(unsign
     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.append(String::deprecatedFormat("\n\tRange attributes for '%s':\n\t\t", substring.get()));
         builder.append(attributeSetToString(attributeSet, "\n\t\t"));
     }
 
@@ -2038,7 +2038,7 @@ JSRetainPtr<JSStringRef> AccessibilityUIElement::url()
 
     // 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 = String::deprecatedFormat("AXURL: %s", localURI ? localURI : hyperlinkURI.get());
     return JSStringCreateWithUTF8CString(axURL.utf8().data());
 }
 
@@ -2346,7 +2346,7 @@ JSRetainPtr<JSStringRef> stringAtOffset(PlatformUIElement element, AtkTextBounda
 #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.append(String::deprecatedFormat(", %i, %i", startOffset, endOffset));
     return JSStringCreateWithUTF8CString(builder.toString().utf8().data());
 }
 
index 0e7d8e6..ed203f4 100644 (file)
@@ -1859,11 +1859,11 @@ void TestController::didReceiveAuthenticationChallenge(WKPageRef page, WKAuthent
 
     std::string host = toSTD(adoptWK(WKProtectionSpaceCopyHost(protectionSpace)).get());
     int port = WKProtectionSpaceGetPort(protectionSpace);
-    String message = String::format("%s:%d - didReceiveAuthenticationChallenge - ", host.c_str(), port);
+    String message = String::deprecatedFormat("%s:%d - didReceiveAuthenticationChallenge - ", host.c_str(), port);
     if (!m_handlesAuthenticationChallenges)
         message.append("Simulating cancelled authentication sheet\n");
     else
-        message.append(String::format("Responding with %s:%s\n", m_authenticationUsername.utf8().data(), m_authenticationPassword.utf8().data()));
+        message.append(String::deprecatedFormat("Responding with %s:%s\n", m_authenticationUsername.utf8().data(), m_authenticationPassword.utf8().data()));
     m_currentInvocation->outputText(message);
 
     if (!m_handlesAuthenticationChallenges) {
@@ -1961,7 +1961,7 @@ void TestController::downloadDidReceiveServerRedirectToURL(WKContextRef, WKDownl
 void TestController::downloadDidFail(WKContextRef, WKDownloadRef, WKErrorRef error)
 {
     if (m_shouldLogDownloadCallbacks) {
-        String message = String::format("Download failed.\n");
+        String message = String::deprecatedFormat("Download failed.\n");
         m_currentInvocation->outputText(message);
 
         WKRetainPtr<WKStringRef> errorDomain = adoptWK(WKErrorCopyDomain(error));
@@ -2070,9 +2070,9 @@ static String originUserVisibleName(WKSecurityOriginRef origin)
 
     unsigned short port = WKSecurityOriginGetPort(origin);
     if (port)
-        return String::format("%s://%s:%d", protocol.c_str(), host.c_str(), port);
+        return String::deprecatedFormat("%s://%s:%d", protocol.c_str(), host.c_str(), port);
 
-    return String::format("%s://%s", protocol.c_str(), host.c_str());
+    return String::deprecatedFormat("%s://%s", protocol.c_str(), host.c_str());
 }
 
 static String userMediaOriginHash(WKSecurityOriginRef userMediaDocumentOrigin, WKSecurityOriginRef topLevelDocumentOrigin)
@@ -2083,7 +2083,7 @@ static String userMediaOriginHash(WKSecurityOriginRef userMediaDocumentOrigin, W
     if (topLevelDocumentOriginString.isEmpty())
         return userMediaDocumentOriginString;
 
-    return String::format("%s-%s", userMediaDocumentOriginString.utf8().data(), topLevelDocumentOriginString.utf8().data());
+    return String::deprecatedFormat("%s-%s", userMediaDocumentOriginString.utf8().data(), topLevelDocumentOriginString.utf8().data());
 }
 
 static String userMediaOriginHash(WKStringRef userMediaDocumentOriginString, WKStringRef topLevelDocumentOriginString)
@@ -2360,7 +2360,7 @@ void TestController::didNavigateWithNavigationData(WKNavigationDataRef navigatio
     WKRetainPtr<WKStringRef> methodWK = adoptWK(WKURLRequestCopyHTTPMethod(requestWK.get()));
 
     // FIXME: Determine whether the navigation was successful / a client redirect rather than hard-coding the message here.
-    m_currentInvocation->outputText(String::format("WebView navigated to url \"%s\" with title \"%s\" with HTTP equivalent method \"%s\".  The navigation was successful and was not a client redirect.\n",
+    m_currentInvocation->outputText(String::deprecatedFormat("WebView navigated to url \"%s\" with title \"%s\" with HTTP equivalent method \"%s\".  The navigation was successful and was not a client redirect.\n",
         toSTD(urlStringWK).c_str(), toSTD(titleWK).c_str(), toSTD(methodWK).c_str()));
 }
 
@@ -2380,7 +2380,7 @@ void TestController::didPerformClientRedirect(WKURLRef sourceURL, WKURLRef desti
     WKRetainPtr<WKStringRef> sourceStringWK = adoptWK(WKURLCopyString(sourceURL));
     WKRetainPtr<WKStringRef> destinationStringWK = adoptWK(WKURLCopyString(destinationURL));
 
-    m_currentInvocation->outputText(String::format("WebView performed a client redirect from \"%s\" to \"%s\".\n", toSTD(sourceStringWK).c_str(), toSTD(destinationStringWK).c_str()));
+    m_currentInvocation->outputText(String::deprecatedFormat("WebView performed a client redirect from \"%s\" to \"%s\".\n", toSTD(sourceStringWK).c_str(), toSTD(destinationStringWK).c_str()));
 }
 
 void TestController::didPerformServerRedirect(WKContextRef, WKPageRef, WKURLRef sourceURL, WKURLRef destinationURL, WKFrameRef frame, const void* clientInfo)
@@ -2399,7 +2399,7 @@ void TestController::didPerformServerRedirect(WKURLRef sourceURL, WKURLRef desti
     WKRetainPtr<WKStringRef> sourceStringWK = adoptWK(WKURLCopyString(sourceURL));
     WKRetainPtr<WKStringRef> destinationStringWK = adoptWK(WKURLCopyString(destinationURL));
 
-    m_currentInvocation->outputText(String::format("WebView performed a server redirect from \"%s\" to \"%s\".\n", toSTD(sourceStringWK).c_str(), toSTD(destinationStringWK).c_str()));
+    m_currentInvocation->outputText(String::deprecatedFormat("WebView performed a server redirect from \"%s\" to \"%s\".\n", toSTD(sourceStringWK).c_str(), toSTD(destinationStringWK).c_str()));
 }
 
 void TestController::didUpdateHistoryTitle(WKContextRef, WKPageRef, WKStringRef title, WKURLRef URL, WKFrameRef frame, const void* clientInfo)
@@ -2416,7 +2416,7 @@ void TestController::didUpdateHistoryTitle(WKStringRef title, WKURLRef URL, WKFr
         return;
 
     WKRetainPtr<WKStringRef> urlStringWK(AdoptWK, WKURLCopyString(URL));
-    m_currentInvocation->outputText(String::format("WebView updated the title for history URL \"%s\" to \"%s\".\n", toSTD(urlStringWK).c_str(), toSTD(title).c_str()));
+    m_currentInvocation->outputText(String::deprecatedFormat("WebView updated the title for history URL \"%s\" to \"%s\".\n", toSTD(urlStringWK).c_str(), toSTD(title).c_str()));
 }
 
 void TestController::setNavigationGesturesEnabled(bool value)