WebKit Bugzilla
Attachment 361015 Details for
Bug 194021
: Eliminate unnecessary String temporaries by using StringConcatenateNumbers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194021-20190203093512.patch (text/plain), 83.51 KB, created by
Darin Adler
on 2019-02-03 09:35:13 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Darin Adler
Created:
2019-02-03 09:35:13 PST
Size:
83.51 KB
patch
obsolete
>Subversion Revision: 240901 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index d5e4549ed1a770c4c16e2d8d49ae7dfa83c3dac6..7a04532653d50601edfccae574ab0f33ec97aed5 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,27 @@ >+2019-01-30 Darin Adler <darin@apple.com> >+ >+ Eliminate unnecessary String temporaries by using StringConcatenateNumbers >+ https://bugs.webkit.org/show_bug.cgi?id=194021 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * inspector/agents/InspectorConsoleAgent.cpp: >+ (Inspector::InspectorConsoleAgent::count): Remove String::number and let >+ makeString do the conversion without allocating/destroying a String. >+ * inspector/agents/InspectorDebuggerAgent.cpp: >+ (Inspector::objectGroupForBreakpointAction): Ditto. >+ (Inspector::InspectorDebuggerAgent::setBreakpointByUrl): Ditto. >+ (Inspector::InspectorDebuggerAgent::setBreakpoint): Ditto. >+ * runtime/JSGenericTypedArrayViewInlines.h: >+ (JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty): Ditto. >+ * runtime/NumberPrototype.cpp: >+ (JSC::numberProtoFuncToFixed): Use String::numberToStringFixedWidth instead >+ of calling numberToFixedWidthString to do the same thing. >+ (JSC::numberProtoFuncToPrecision): Use String::number instead of calling >+ numberToFixedPrecisionString to do the same thing. >+ * runtime/SamplingProfiler.cpp: >+ (JSC::SamplingProfiler::reportTopFunctions): Ditto. >+ > 2019-02-01 Yusuke Suzuki <ysuzuki@apple.com> > > [JSC] Decouple JIT related data from CodeBlock >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index 3864715347db3a59d2b437f07614b7bc31132db3..38771e2ae8186df3248b10a7f98801be4a135b6c 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,22 @@ >+2019-01-30 Darin Adler <darin@apple.com> >+ >+ Eliminate unnecessary String temporaries by using StringConcatenateNumbers >+ https://bugs.webkit.org/show_bug.cgi?id=194021 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/URL.cpp: >+ (WTF::URL::setPort): Remove String::number and let makeString do the conversion >+ without allocating/destroying a String. Added a cast to "unsigned" to sidestep the >+ ambiguity with 16-bit unsigned types that are sometimes used for numbers (uint16_t) >+ and sometimes used for UTF-16 code units (UChar) and can be the same type. >+ >+ * wtf/text/StringConcatenateNumbers.h: >+ Changed FormattedNumber::fixedPrecision to more closely match String::number and >+ StringBuilder::appendNumber by defaulting to truncating trailing zeros and using >+ a named enumeration for the truncation policy rather than a boolean. >+ >+ > 2019-02-02 David Kilzer <ddkilzer@apple.com> > > Leak of WTF::StringImpl under SymbolImpl::createNullSymbol() (48 bytes) in com.apple.WebKit.WebContent running layout tests >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 990c955991d45ab7c63e1ca9bef6e410329ce712..43277594fb345c534328c2224f40f225fcf19331 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,140 @@ >+2019-01-30 Darin Adler <darin@apple.com> >+ >+ Eliminate unnecessary String temporaries by using StringConcatenateNumbers >+ https://bugs.webkit.org/show_bug.cgi?id=194021 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ For floating point numbers, String::number gives a fixed precision result, >+ stripping trailing zeroes. When possible, I changed the code to instead use the >+ equivalent of String::numberToStringECMAScript, which is what makeString does by >+ default for floating point, gives the same results for many cases, and gives >+ better results in many others. However, for floats, we do not yet have a good >+ implementation, so instead I used FormattedNumber::fixedPrecision to match >+ the old behavior. >+ >+ * Modules/indexeddb/shared/IDBTransactionInfo.cpp: >+ (WebCore::IDBTransactionInfo::loggingString const): Remove String::number and let >+ makeString do the conversion without allocating/destroying a String. >+ * Modules/websockets/ThreadableWebSocketChannel.cpp: >+ (WebCore::ThreadableWebSocketChannel::create): Ditto. >+ * Modules/websockets/WebSocket.cpp: >+ (WebCore::WebSocket::connect): Ditto. Added a cast to "unsigned" to sidestep the >+ ambiguity with 16-bit unsigned types that are sometimes used for numbers (uint16_t) >+ and sometimes used for UTF-16 code units (UChar) and can be the same type. >+ >+ * Modules/websockets/WebSocketChannel.cpp: >+ (WebCore::WebSocketChannel::didFailSocketStream): Use ASCIILiteral when intializing >+ a string instead of just a normal C literal. Switched to makeString so we could >+ remove String::number and do the conversion without allocating/destroying a String. >+ (WebCore::WebSocketChannel::didFail): Ditto. >+ (WebCore::WebSocketChannel::processFrame): Ditto. >+ * Modules/websockets/WebSocketFrame.cpp: >+ (WebCore::WebSocketFrame::parseFrame): Ditto. >+ * Modules/websockets/WebSocketHandshake.cpp: >+ (WebCore::WebSocketHandshake::readServerHandshake): Ditto. >+ * accessibility/AccessibilityRenderObject.cpp: >+ (WebCore::AccessibilityRenderObject::positionalDescriptionForMSAA const): Ditto. >+ * bindings/js/JSDOMConvertNumbers.cpp: >+ (WebCore::rangeErrorString): Ditto. >+ * css/CSSAspectRatioValue.cpp: >+ (WebCore::CSSAspectRatioValue::customCSSText const): Ditto. Used >+ FormattedNumber::fixedPrecision since these are floats. >+ >+ * css/DOMMatrixReadOnly.cpp: >+ (WebCore::DOMMatrixReadOnly::toString const): Use >+ StringBuilder::builder.appendECMAScriptNumber instead of >+ String::numberToStringECMAScript so we can do it without allocating/destroying >+ a String. >+ * css/WebKitCSSMatrix.cpp: >+ (WebCore::WebKitCSSMatrix::toString const): Ditto. >+ >+ * dom/MessagePortIdentifier.h: >+ (WebCore::MessagePortIdentifier::logString const): Remove String::number and let >+ makeString do the conversion without allocating/destroying a String. >+ >+ * editing/cocoa/DataDetection.mm: >+ (WebCore::dataDetectorStringForPath): Remove unnecessary type casts on values >+ passed to String::number and to StringBuilder::appendNumber. These could do >+ harm if the values were out of range, and should not be necessary. >+ >+ * history/BackForwardItemIdentifier.h: >+ (WebCore::BackForwardItemIdentifier::logString const): Remove String::number >+ and let makeString do the conversion without allocating/destroying a String. >+ * html/FTPDirectoryDocument.cpp: >+ (WebCore::processFileDateString): Ditto. >+ * html/canvas/WebGLRenderingContextBase.cpp: >+ (WebCore::WebGLRenderingContextBase::getUniformLocation): Ditto. >+ (WebCore::WebGLRenderingContextBase::checkTextureCompleteness): Ditto. >+ * inspector/agents/WebConsoleAgent.cpp: >+ (WebCore::WebConsoleAgent::didReceiveResponse): Ditto. >+ * loader/WorkerThreadableLoader.cpp: >+ (WebCore::WorkerThreadableLoader::loadResourceSynchronously): Ditto. >+ * loader/appcache/ApplicationCacheGroup.cpp: >+ (WebCore::ApplicationCacheGroup::didFailLoadingManifest): Ditto. >+ * page/PageSerializer.cpp: >+ (WebCore::PageSerializer::urlForBlankFrame): Ditto. >+ * page/PrintContext.cpp: >+ (WebCore::PrintContext::pageProperty): Ditto. >+ (WebCore::PrintContext::pageSizeAndMarginsInPixels): Ditto. >+ >+ * page/WheelEventTestTrigger.cpp: >+ (WebCore::dumpState): Use StringBuilder::appendNumber instead of >+ String::number so we can do it without allocating/destroying a String. >+ Also use StringBuilder::appendLiteral on a literal. >+ >+ * page/cocoa/ResourceUsageOverlayCocoa.mm: >+ (WebCore::ResourceUsageOverlay::platformDraw): Pass explicit >+ KeepTrailingZeros to FormattedNumber::fixedPrecision to preserve behavior, >+ since default is now to truncate trailing zeros. >+ >+ * platform/graphics/Color.cpp: >+ (WebCore::Color::cssText): Use StringBuilder::appendNumber instead of >+ calling numberToFixedPrecisionString to do the same thing. >+ * platform/graphics/ExtendedColor.cpp: >+ (WebCore::ExtendedColor::cssText): Ditto. >+ >+ * platform/graphics/ca/GraphicsLayerCA.cpp: >+ (WebCore::animationIdentifier): Remove String::number and let makeString >+ do the conversion without allocating/destroying a String. Had to add >+ a typecast to convert the enumeration into an integer. >+ * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: >+ (WebCore::PlatformCAFilters::setFiltersOnLayer): Ditto. >+ * platform/graphics/cocoa/FontPlatformDataCocoa.mm: >+ (WebCore::FontPlatformData::description const): Ditto. >+ >+ * platform/mock/mediasource/MockSourceBufferPrivate.cpp: >+ (WebCore::MockMediaSample::MockMediaSample): Use AtomicString::number >+ instead of String::number to avoid unneccessarily allocating an additional >+ temporary String when an AtomicString already exists. >+ >+ * platform/network/cf/SocketStreamHandleImplCFNet.cpp: >+ (WebCore::SocketStreamHandleImpl::reportErrorToClient): Remove String::number >+ and let makeString do the conversion without allocating/destroying a String. >+ * platform/sql/SQLiteDatabase.cpp: >+ (WebCore::SQLiteDatabase::setMaximumSize): Ditto. >+ (WebCore::SQLiteDatabase::setSynchronous): Ditto. Had to add a typecast to >+ convert the enumeration into an integer. >+ * svg/SVGAngleValue.cpp: >+ (WebCore::SVGAngleValue::valueAsString const): Ditto. >+ * svg/SVGLengthValue.cpp: >+ (WebCore::SVGLengthValue::valueAsString const): Ditto. >+ * testing/Internals.cpp: >+ (WebCore::Internals::configurationForViewport): Ditto. Used >+ FormattedNumber::fixedPrecision since these are floats. >+ (WebCore::Internals::getCurrentCursorInfo): Use StringBuilder::appendNumber >+ instead of calling numberToFixedPrecisionString to do the same thing. >+ (WebCore::Internals::queueMicroTask): Remove String::number and let makeString >+ do the conversion without allocating/destroying a String. >+ (WebCore::appendOffsets): Use StringBuilder::appendNumber instead of >+ String::number so we can do it without allocating/destroying a String. >+ >+ * workers/service/ServiceWorkerClientIdentifier.h: >+ (WebCore::ServiceWorkerClientIdentifier::toString const): Remove String::number >+ and let makeString do the conversion without allocating/destroying a String. >+ * workers/service/server/RegistrationDatabase.cpp: >+ (WebCore::databaseFilenameFromVersion): Ditto. >+ > 2019-02-02 Simon Fraser <simon.fraser@apple.com> > > Tidy up data memebers of FrameView and related classes to shrink class sizes >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 93034e03c4d641f88f1b9aa7c4d849046be845ad..7d19529f5cb6600ea76ae26aa9b118d73e01647b 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,38 @@ >+2019-01-30 Darin Adler <darin@apple.com> >+ >+ Eliminate unnecessary String temporaries by using StringConcatenateNumbers >+ https://bugs.webkit.org/show_bug.cgi?id=194021 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/NetworkResourceLoader.cpp: >+ (WebKit::escapeIDForJSON): Use an ASCIILiteral to create a String. >+ >+ * NetworkProcess/cache/NetworkCacheStorage.cpp: >+ (WebKit::NetworkCache::makeVersionedDirectoryPath): Remove String::number and let >+ makeString do the conversion without allocating/destroying a String. >+ >+ * NetworkProcess/mac/RemoteNetworkingContext.mm: Removed "using namespace WebCore". >+ (WebKit::RemoteNetworkingContext::ensureWebsiteDataStoreSession): Remove String::number >+ and let makeString do the conversion without allocating/destroying a String. >+ >+ * NetworkProcess/webrtc/NetworkMDNSRegister.cpp: Removed "using namespace WebCore". >+ (WebKit::registerMDNSNameCallback): Added explicit WebCore prefix as needed. >+ (WebKit::NetworkMDNSRegister::registerMDNSName): Ditto. Also remove String::number >+ and let makeString do the conversion without allocating/destroying a String. >+ >+ * UIProcess/WebPageGroup.cpp: >+ (WebKit::pageGroupData): Remove String::number and let makeString do the conversion >+ without allocating/destroying a String. >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::createInspectorTargets): Ditto. >+ * UIProcess/ios/WKLegacyPDFView.mm: >+ (-[WKLegacyPDFView _URLForLinkAnnotation:]): Ditto. >+ * WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp: >+ (WebKit::uniqueWorldName): Ditto. >+ * WebProcess/WebPage/WebPageInspectorTarget.cpp: >+ (WebKit::WebPageInspectorTarget::identifier const): Ditto. >+ > 2019-02-02 Simon Fraser <simon.fraser@apple.com> > > Tidy up data memebers of FrameView and related classes to shrink class sizes >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >index 8a874a767a8b37b883b724d62a1627ed6e7ad867..85bdb81273607233b5e15eb1641551e667e5fbf7 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp >@@ -203,7 +203,7 @@ void InspectorConsoleAgent::count(JSC::ExecState* state, Ref<ScriptArguments>&& > > // FIXME: Web Inspector should have a better UI for counters, but for now we just log an updated counter value. > >- String message = makeString(title, ": ", String::number(result.iterator->value)); >+ String message = makeString(title, ": ", result.iterator->value); > addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::ConsoleAPI, MessageType::Log, MessageLevel::Debug, message, WTFMove(callStack))); > } > >diff --git a/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp b/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp >index ece5647c9c84596ccbcce9623ae5f6401f30cea0..5631672c206af5af5240ec8a87b5770cb67ec575 100644 >--- a/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp >+++ b/Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp >@@ -57,8 +57,7 @@ const char* InspectorDebuggerAgent::backtraceObjectGroup = "backtrace"; > // create objects in the same group. > static String objectGroupForBreakpointAction(const ScriptBreakpointAction& action) > { >- static NeverDestroyed<String> objectGroup(MAKE_STATIC_STRING_IMPL("breakpoint-action-")); >- return makeString(objectGroup.get(), String::number(action.identifier)); >+ return makeString("breakpoint-action-", action.identifier); > } > > InspectorDebuggerAgent::InspectorDebuggerAgent(AgentContext& context) >@@ -447,7 +446,7 @@ void InspectorDebuggerAgent::setBreakpointByUrl(ErrorString& errorString, int li > int columnNumber = optionalColumnNumber ? *optionalColumnNumber : 0; > bool isRegex = optionalURLRegex; > >- String breakpointIdentifier = (isRegex ? "/" + url + "/" : url) + ':' + String::number(lineNumber) + ':' + String::number(columnNumber); >+ String breakpointIdentifier = makeString(isRegex ? "/" : "", url, isRegex ? "/:" : ":", lineNumber, ':', columnNumber); > if (m_javaScriptBreakpoints.contains(breakpointIdentifier)) { > errorString = "Breakpoint at specified location already exists."_s; > return; >@@ -540,7 +539,7 @@ void InspectorDebuggerAgent::setBreakpoint(ErrorString& errorString, const JSON: > return; > } > >- String breakpointIdentifier = String::number(sourceID) + ':' + String::number(breakpoint.line) + ':' + String::number(breakpoint.column); >+ String breakpointIdentifier = makeString(sourceID, ':', breakpoint.line, ':', breakpoint.column); > ScriptBreakpoint scriptBreakpoint(breakpoint.line, breakpoint.column, condition, breakpointActions, autoContinue, ignoreCount); > didSetBreakpoint(breakpoint, breakpointIdentifier, scriptBreakpoint); > >diff --git a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h >index f3c0d393884f2c1cde50f8e79723705e3e8e71bd..1c5d5732a8be57f3390fa2f039e2b3e70dc873df 100644 >--- a/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h >+++ b/Source/JavaScriptCore/runtime/JSGenericTypedArrayViewInlines.h >@@ -33,6 +33,7 @@ > #include "JSGenericTypedArrayView.h" > #include "TypeError.h" > #include "TypedArrays.h" >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace JSC { > >@@ -390,7 +391,7 @@ bool JSGenericTypedArrayView<Adaptor>::defineOwnProperty( > if (Optional<uint32_t> index = parseIndex(propertyName)) { > auto throwTypeErrorIfNeeded = [&] (const char* errorMessage) -> bool { > if (shouldThrow) >- throwTypeError(exec, scope, makeString(errorMessage, String::number(*index))); >+ throwTypeError(exec, scope, makeString(errorMessage, *index)); > return false; > }; > >diff --git a/Source/JavaScriptCore/runtime/NumberPrototype.cpp b/Source/JavaScriptCore/runtime/NumberPrototype.cpp >index b46f8ac7ea32097d914620bbd6014df0d1b19e07..c83783a0d532ecf315c7129c556b023241bd0897 100644 >--- a/Source/JavaScriptCore/runtime/NumberPrototype.cpp >+++ b/Source/JavaScriptCore/runtime/NumberPrototype.cpp >@@ -465,8 +465,7 @@ EncodedJSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec) > // handled by numberToString. > ASSERT(std::isfinite(x)); > >- NumberToStringBuffer buffer; >- return JSValue::encode(jsString(exec, String(numberToFixedWidthString(x, decimalPlaces, buffer)))); >+ return JSValue::encode(jsString(exec, String::numberToStringFixedWidth(x, decimalPlaces))); > } > > // toPrecision converts a number to a string, taking an argument specifying a >@@ -502,8 +501,7 @@ EncodedJSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec) > if (!inRange) > return throwVMError(exec, scope, createRangeError(exec, "toPrecision() argument must be between 1 and 21"_s)); > >- NumberToStringBuffer buffer; >- return JSValue::encode(jsString(exec, String(numberToFixedPrecisionString(x, significantFigures, buffer)))); >+ return JSValue::encode(jsString(exec, String::number(x, significantFigures, KeepTrailingZeros))); > } > > static ALWAYS_INLINE JSString* int32ToStringInternal(VM& vm, int32_t value, int32_t radix) >diff --git a/Source/JavaScriptCore/runtime/SamplingProfiler.cpp b/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >index 07df96681d3e3d61eede15c63115dc7601da0963..6307303446600e4212efe33d53966d0b9e4b5b9b 100644 >--- a/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >+++ b/Source/JavaScriptCore/runtime/SamplingProfiler.cpp >@@ -54,6 +54,7 @@ > #include <wtf/RefPtr.h> > #include <wtf/StackTrace.h> > #include <wtf/text/StringBuilder.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace JSC { > >@@ -974,7 +975,7 @@ void SamplingProfiler::reportTopFunctions(PrintStream& out) > continue; > > StackFrame& frame = stackTrace.frames.first(); >- String frameDescription = makeString(frame.displayName(m_vm), ":", String::number(frame.sourceID())); >+ String frameDescription = makeString(frame.displayName(m_vm), ':', frame.sourceID()); > functionCounts.add(frameDescription, 0).iterator->value++; > } > >diff --git a/Source/WTF/wtf/URL.cpp b/Source/WTF/wtf/URL.cpp >index 64b4a0b1755e1b79dc2e45c3b518c9d262e1dba5..b78db9f1c8f11ec12d93413bd85984f18b60ca06 100644 >--- a/Source/WTF/wtf/URL.cpp >+++ b/Source/WTF/wtf/URL.cpp >@@ -470,7 +470,7 @@ void URL::setPort(unsigned short i) > bool colonNeeded = !m_portLength; > unsigned portStart = (colonNeeded ? m_hostEnd : m_hostEnd + 1); > >- URLParser parser(makeString(StringView(m_string).left(portStart), (colonNeeded ? ":" : ""), String::number(i), StringView(m_string).substring(m_hostEnd + m_portLength))); >+ URLParser parser(makeString(StringView(m_string).left(portStart), (colonNeeded ? ":" : ""), static_cast<unsigned>(i), StringView(m_string).substring(m_hostEnd + m_portLength))); > *this = parser.result(); > } > >diff --git a/Source/WTF/wtf/text/StringConcatenateNumbers.h b/Source/WTF/wtf/text/StringConcatenateNumbers.h >index 8c8465af6ef29832507d46c867196a83eb8036e4..6ce72782af43db72b5d6c989273dc15557b7cfb2 100644 >--- a/Source/WTF/wtf/text/StringConcatenateNumbers.h >+++ b/Source/WTF/wtf/text/StringConcatenateNumbers.h >@@ -104,10 +104,10 @@ private: > > class FormattedNumber { > public: >- static FormattedNumber fixedPrecision(double number, unsigned significantFigures = 6, bool truncateTrailingZeros = false) >+ static FormattedNumber fixedPrecision(double number, unsigned significantFigures = 6, TrailingZerosTruncatingPolicy trailingZerosTruncatingPolicy = TruncateTrailingZeros) > { > FormattedNumber numberFormatter; >- numberToFixedPrecisionString(number, significantFigures, numberFormatter.m_buffer, truncateTrailingZeros); >+ numberToFixedPrecisionString(number, significantFigures, numberFormatter.m_buffer, trailingZerosTruncatingPolicy == TruncateTrailingZeros); > numberFormatter.m_length = strlen(numberFormatter.m_buffer); > return numberFormatter; > } >diff --git a/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp b/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp >index 29ea7790153d3f55e807a0a0098e96067c4c8a35..983c1c11c99b45b6ce544dfcac037e4c737295c3 100644 >--- a/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp >+++ b/Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp >@@ -95,6 +95,7 @@ void IDBTransactionInfo::isolatedCopy(const IDBTransactionInfo& source, IDBTrans > } > > #if !LOG_DISABLED >+ > String IDBTransactionInfo::loggingString() const > { > String modeString; >@@ -112,8 +113,9 @@ String IDBTransactionInfo::loggingString() const > ASSERT_NOT_REACHED(); > } > >- return makeString("Transaction: ", m_identifier.loggingString(), " mode ", modeString, " newVersion ", String::number(m_newVersion)); >+ return makeString("Transaction: ", m_identifier.loggingString(), " mode ", modeString, " newVersion ", m_newVersion); > } >+ > #endif > > } // namespace WebCore >diff --git a/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp b/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp >index 93c0fd7fb7d0b3a1834fc3a0ccddc9a03c614a39..8299bb9e6ac9d897b59b8068a6687f5da752b528 100644 >--- a/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp >+++ b/Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp >@@ -48,7 +48,7 @@ Ref<ThreadableWebSocketChannel> ThreadableWebSocketChannel::create(ScriptExecuti > if (is<WorkerGlobalScope>(context)) { > WorkerGlobalScope& workerGlobalScope = downcast<WorkerGlobalScope>(context); > WorkerRunLoop& runLoop = workerGlobalScope.thread().runLoop(); >- return WorkerThreadableWebSocketChannel::create(workerGlobalScope, client, makeString("webSocketChannelMode", String::number(runLoop.createUniqueId())), provider); >+ return WorkerThreadableWebSocketChannel::create(workerGlobalScope, client, makeString("webSocketChannelMode", runLoop.createUniqueId()), provider); > } > > return WebSocketChannel::create(downcast<Document>(context), client, provider); >diff --git a/Source/WebCore/Modules/websockets/WebSocket.cpp b/Source/WebCore/Modules/websockets/WebSocket.cpp >index ac9cf79952313207dba0872ab22d1bbc0a430965..c85a035d52fb7ec65400e43967a28f10c6960008 100644 >--- a/Source/WebCore/Modules/websockets/WebSocket.cpp >+++ b/Source/WebCore/Modules/websockets/WebSocket.cpp >@@ -234,7 +234,7 @@ ExceptionOr<void> WebSocket::connect(const String& url, const Vector<String>& pr > if (!portAllowed(m_url)) { > String message; > if (m_url.port()) >- message = makeString("WebSocket port ", String::number(m_url.port().value()), " blocked"); >+ message = makeString("WebSocket port ", static_cast<unsigned>(m_url.port().value()), " blocked"); > else > message = "WebSocket without port blocked"_s; > context.addConsoleMessage(MessageSource::JS, MessageLevel::Error, message); >diff --git a/Source/WebCore/Modules/websockets/WebSocketChannel.cpp b/Source/WebCore/Modules/websockets/WebSocketChannel.cpp >index 24aea60a4d8c7fc60de2d06ecb23a1602b5a4023..70c2681b46fb1bc71697beb8c6013efe7a958e1a 100644 >--- a/Source/WebCore/Modules/websockets/WebSocketChannel.cpp >+++ b/Source/WebCore/Modules/websockets/WebSocketChannel.cpp >@@ -57,7 +57,6 @@ > #include <wtf/HashMap.h> > #include <wtf/text/CString.h> > #include <wtf/text/StringHash.h> >-#include <wtf/text/WTFString.h> > > namespace WebCore { > >@@ -359,9 +358,9 @@ void WebSocketChannel::didFailSocketStream(SocketStreamHandle& handle, const Soc > if (m_document) { > String message; > if (error.isNull()) >- message = "WebSocket network error"; >+ message = "WebSocket network error"_s; > else if (error.localizedDescription().isNull()) >- message = "WebSocket network error: error code " + String::number(error.errorCode()); >+ message = makeString("WebSocket network error: error code ", error.errorCode()); > else > message = "WebSocket network error: " + error.localizedDescription(); > InspectorInstrumentation::didReceiveWebSocketFrameError(m_document, m_identifier, message); >@@ -404,7 +403,7 @@ void WebSocketChannel::didFail(int errorCode) > ASSERT(m_blobLoaderStatus == BlobLoaderStarted); > m_blobLoader = nullptr; > m_blobLoaderStatus = BlobLoaderFailed; >- fail("Failed to load Blob: error code = " + String::number(errorCode)); // FIXME: Generate human-friendly reason message. >+ fail(makeString("Failed to load Blob: error code = ", errorCode)); // FIXME: Generate human-friendly reason message. > deref(); > } > >@@ -549,12 +548,12 @@ bool WebSocketChannel::processFrame() > > // Validate the frame data. > if (WebSocketFrame::isReservedOpCode(frame.opCode)) { >- fail("Unrecognized frame opcode: " + String::number(frame.opCode)); >+ fail(makeString("Unrecognized frame opcode: ", static_cast<int>(frame.opCode))); > return false; > } > > if (frame.reserved2 || frame.reserved3) { >- fail("One or more reserved bits are on: reserved2 = " + String::number(frame.reserved2) + ", reserved3 = " + String::number(frame.reserved3)); >+ fail(makeString("One or more reserved bits are on: reserved2 = ", static_cast<int>(frame.reserved2), ", reserved3 = ", static_cast<int>(frame.reserved3))); > return false; > } > >@@ -565,14 +564,14 @@ bool WebSocketChannel::processFrame() > > // All control frames must not be fragmented. > if (WebSocketFrame::isControlOpCode(frame.opCode) && !frame.final) { >- fail("Received fragmented control frame: opcode = " + String::number(frame.opCode)); >+ fail(makeString("Received fragmented control frame: opcode = ", static_cast<int>(frame.opCode))); > return false; > } > > // All control frames must have a payload of 125 bytes or less, which means the frame must not contain > // the "extended payload length" field. > if (WebSocketFrame::isControlOpCode(frame.opCode) && WebSocketFrame::needsExtendedLengthField(frame.payloadLength)) { >- fail("Received control frame having too long payload: " + String::number(frame.payloadLength) + " bytes"); >+ fail(makeString("Received control frame having too long payload: ", frame.payloadLength, " bytes")); > return false; > } > >diff --git a/Source/WebCore/Modules/websockets/WebSocketFrame.cpp b/Source/WebCore/Modules/websockets/WebSocketFrame.cpp >index 0b52ecc3a7da362897c3e50850bccf4998273bad..5a6e005dc47a58f2ac0d0a366c76691b9b5fbedc 100644 >--- a/Source/WebCore/Modules/websockets/WebSocketFrame.cpp >+++ b/Source/WebCore/Modules/websockets/WebSocketFrame.cpp >@@ -93,7 +93,7 @@ WebSocketFrame::ParseFrameResult WebSocketFrame::parseFrame(char* data, size_t d > static const uint64_t maxPayloadLength = UINT64_C(0x7FFFFFFFFFFFFFFF); > size_t maskingKeyLength = masked ? maskingKeyWidthInBytes : 0; > if (payloadLength64 > maxPayloadLength || payloadLength64 + maskingKeyLength > std::numeric_limits<size_t>::max()) { >- errorString = "WebSocket frame length too large: " + String::number(payloadLength64) + " bytes"; >+ errorString = makeString("WebSocket frame length too large: ", payloadLength64, " bytes"); > return FrameError; > } > size_t payloadLength = static_cast<size_t>(payloadLength64); >diff --git a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp b/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp >index d51cc3211172e95393d7427807e5c48c335540d9..141757cc4e6da5534e9508d676ff23d8b44ca252 100644 >--- a/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp >+++ b/Source/WebCore/Modules/websockets/WebSocketHandshake.cpp >@@ -302,7 +302,7 @@ int WebSocketHandshake::readServerHandshake(const char* header, size_t len) > > if (statusCode != 101) { > m_mode = Failed; >- m_failureReason = makeString("Unexpected response code: ", String::number(statusCode)); >+ m_failureReason = makeString("Unexpected response code: ", statusCode); > return len; > } > m_mode = Normal; >diff --git a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >index 78ad959f440acd0163fd6be04ca551c0f6abd76a..94233f0410771fcc391677e37a985fa5ab334b50 100644 >--- a/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >+++ b/Source/WebCore/accessibility/AccessibilityRenderObject.cpp >@@ -3676,7 +3676,7 @@ String AccessibilityRenderObject::positionalDescriptionForMSAA() const > // See "positional descriptions", > // https://wiki.mozilla.org/Accessibility/AT-Windows-API > if (isHeading()) >- return "L" + String::number(headingLevel()); >+ return makeString('L', headingLevel()); > > // FIXME: Add positional descriptions for other elements. > return String(); >diff --git a/Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp b/Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp >index cff39aba8cbcb4373204f5871585ecc750816baa..f8b640deda22850926a727ec26a071fce2d5b3e6 100644 >--- a/Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp >+++ b/Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp >@@ -41,7 +41,7 @@ static const int64_t kJSMaxInteger = 0x20000000000000LL - 1; // 2^53 - 1, larges > > static String rangeErrorString(double value, double min, double max) > { >- return makeString("Value ", String::numberToStringECMAScript(value), " is outside the range [", String::numberToStringECMAScript(min), ", ", String::numberToStringECMAScript(max), "]"); >+ return makeString("Value ", value, " is outside the range [", min, ", ", max, ']'); > } > > static double enforceRange(ExecState& state, double x, double minimum, double maximum) >diff --git a/Source/WebCore/css/CSSAspectRatioValue.cpp b/Source/WebCore/css/CSSAspectRatioValue.cpp >index 5c414aba91e381a61a6e9334303e47f977a83b33..7856097f64d9d3c98099e21ea1f4cdaf61451c60 100644 >--- a/Source/WebCore/css/CSSAspectRatioValue.cpp >+++ b/Source/WebCore/css/CSSAspectRatioValue.cpp >@@ -29,11 +29,13 @@ > #include "config.h" > #include "CSSAspectRatioValue.h" > >+#include <wtf/text/StringConcatenateNumbers.h> >+ > namespace WebCore { > > String CSSAspectRatioValue::customCSSText() const > { >- return String::number(m_numeratorValue) + '/' + String::number(m_denominatorValue); >+ return makeString(FormattedNumber::fixedPrecision(m_numeratorValue), '/', FormattedNumber::fixedPrecision(m_denominatorValue)); > } > > bool CSSAspectRatioValue::equals(const CSSAspectRatioValue& other) const >diff --git a/Source/WebCore/css/DOMMatrixReadOnly.cpp b/Source/WebCore/css/DOMMatrixReadOnly.cpp >index 13996fb553ce1c6a8f72ba99e486de1a48dd5b03..260c7b495ce46cb4a12d5a430f43bbf95fba3be2 100644 >--- a/Source/WebCore/css/DOMMatrixReadOnly.cpp >+++ b/Source/WebCore/css/DOMMatrixReadOnly.cpp >@@ -404,50 +404,50 @@ ExceptionOr<String> DOMMatrixReadOnly::toString() const > StringBuilder builder; > if (is2D()) { > builder.appendLiteral("matrix("); >- builder.append(String::numberToStringECMAScript(m_matrix.a())); >+ builder.appendECMAScriptNumber(m_matrix.a()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.b())); >+ builder.appendECMAScriptNumber(m_matrix.b()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.c())); >+ builder.appendECMAScriptNumber(m_matrix.c()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.d())); >+ builder.appendECMAScriptNumber(m_matrix.d()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.e())); >+ builder.appendECMAScriptNumber(m_matrix.e()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.f())); >+ builder.appendECMAScriptNumber(m_matrix.f()); > } else { > builder.appendLiteral("matrix3d("); >- builder.append(String::numberToStringECMAScript(m_matrix.m11())); >+ builder.appendECMAScriptNumber(m_matrix.m11()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m12())); >+ builder.appendECMAScriptNumber(m_matrix.m12()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m13())); >+ builder.appendECMAScriptNumber(m_matrix.m13()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m14())); >+ builder.appendECMAScriptNumber(m_matrix.m14()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m21())); >+ builder.appendECMAScriptNumber(m_matrix.m21()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m22())); >+ builder.appendECMAScriptNumber(m_matrix.m22()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m23())); >+ builder.appendECMAScriptNumber(m_matrix.m23()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m24())); >+ builder.appendECMAScriptNumber(m_matrix.m24()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m31())); >+ builder.appendECMAScriptNumber(m_matrix.m31()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m32())); >+ builder.appendECMAScriptNumber(m_matrix.m32()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m33())); >+ builder.appendECMAScriptNumber(m_matrix.m33()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m34())); >+ builder.appendECMAScriptNumber(m_matrix.m34()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m41())); >+ builder.appendECMAScriptNumber(m_matrix.m41()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m42())); >+ builder.appendECMAScriptNumber(m_matrix.m42()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m43())); >+ builder.appendECMAScriptNumber(m_matrix.m43()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m44())); >+ builder.appendECMAScriptNumber(m_matrix.m44()); > } > builder.append(')'); > return builder.toString(); >diff --git a/Source/WebCore/css/WebKitCSSMatrix.cpp b/Source/WebCore/css/WebKitCSSMatrix.cpp >index 1a88fea46640197dc5bf9718a4f20eb1a9a4b90a..69afc40781580d2eb5c49f8c900f5a4f11a89364 100644 >--- a/Source/WebCore/css/WebKitCSSMatrix.cpp >+++ b/Source/WebCore/css/WebKitCSSMatrix.cpp >@@ -203,50 +203,50 @@ ExceptionOr<String> WebKitCSSMatrix::toString() const > StringBuilder builder; > if (m_matrix.isAffine()) { > builder.appendLiteral("matrix("); >- builder.append(String::numberToStringECMAScript(m_matrix.a())); >+ builder.appendECMAScriptNumber(m_matrix.a()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.b())); >+ builder.appendECMAScriptNumber(m_matrix.b()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.c())); >+ builder.appendECMAScriptNumber(m_matrix.c()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.d())); >+ builder.appendECMAScriptNumber(m_matrix.d()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.e())); >+ builder.appendECMAScriptNumber(m_matrix.e()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.f())); >+ builder.appendECMAScriptNumber(m_matrix.f()); > } else { > builder.appendLiteral("matrix3d("); >- builder.append(String::numberToStringECMAScript(m_matrix.m11())); >+ builder.appendECMAScriptNumber(m_matrix.m11()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m12())); >+ builder.appendECMAScriptNumber(m_matrix.m12()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m13())); >+ builder.appendECMAScriptNumber(m_matrix.m13()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m14())); >+ builder.appendECMAScriptNumber(m_matrix.m14()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m21())); >+ builder.appendECMAScriptNumber(m_matrix.m21()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m22())); >+ builder.appendECMAScriptNumber(m_matrix.m22()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m23())); >+ builder.appendECMAScriptNumber(m_matrix.m23()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m24())); >+ builder.appendECMAScriptNumber(m_matrix.m24()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m31())); >+ builder.appendECMAScriptNumber(m_matrix.m31()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m32())); >+ builder.appendECMAScriptNumber(m_matrix.m32()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m33())); >+ builder.appendECMAScriptNumber(m_matrix.m33()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m34())); >+ builder.appendECMAScriptNumber(m_matrix.m34()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m41())); >+ builder.appendECMAScriptNumber(m_matrix.m41()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m42())); >+ builder.appendECMAScriptNumber(m_matrix.m42()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m43())); >+ builder.appendECMAScriptNumber(m_matrix.m43()); > builder.appendLiteral(", "); >- builder.append(String::numberToStringECMAScript(m_matrix.m44())); >+ builder.appendECMAScriptNumber(m_matrix.m44()); > } > builder.append(')'); > return builder.toString(); >diff --git a/Source/WebCore/dom/MessagePortIdentifier.h b/Source/WebCore/dom/MessagePortIdentifier.h >index d578a973030108b043e277b4757153000c6b94a1..c08752c18fb33e9a23bcfeaabf505f42ddd052f0 100644 >--- a/Source/WebCore/dom/MessagePortIdentifier.h >+++ b/Source/WebCore/dom/MessagePortIdentifier.h >@@ -27,7 +27,7 @@ > > #include "ProcessIdentifier.h" > #include <wtf/Hasher.h> >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -79,10 +79,12 @@ inline unsigned MessagePortIdentifier::hash() const > } > > #if !LOG_DISABLED >+ > inline String MessagePortIdentifier::logString() const > { >- return makeString(String::number(processIdentifier.toUInt64()), "-", String::number(portIdentifier.toUInt64())); >+ return makeString(processIdentifier.toUInt64(), '-', portIdentifier.toUInt64()); > } >+ > #endif > > } // namespace WebCore >diff --git a/Source/WebCore/editing/cocoa/DataDetection.mm b/Source/WebCore/editing/cocoa/DataDetection.mm >index 3a02181589dd88780349b6cc5131c65a22527713..ebe4bdc4210b67c058df01f1ae9d504e0a33b76e 100644 >--- a/Source/WebCore/editing/cocoa/DataDetection.mm >+++ b/Source/WebCore/editing/cocoa/DataDetection.mm >@@ -323,20 +323,20 @@ static String dataDetectorStringForPath(NSIndexPath *path) > case 0: > return { }; > case 1: >- return String::number((unsigned long)[path indexAtPosition:0]); >+ return String::number([path indexAtPosition:0]); > case 2: { > StringBuilder stringBuilder; >- stringBuilder.appendNumber((unsigned long)[path indexAtPosition:0]); >+ stringBuilder.appendNumber([path indexAtPosition:0]); > stringBuilder.append('/'); >- stringBuilder.appendNumber((unsigned long)[path indexAtPosition:1]); >+ stringBuilder.appendNumber([path indexAtPosition:1]); > return stringBuilder.toString(); > } > default: { > StringBuilder stringBuilder; >- stringBuilder.appendNumber((unsigned long)[path indexAtPosition:0]); >+ stringBuilder.appendNumber([path indexAtPosition:0]); > for (NSUInteger i = 1 ; i < length ; i++) { > stringBuilder.append('/'); >- stringBuilder.appendNumber((unsigned long)[path indexAtPosition:i]); >+ stringBuilder.appendNumber([path indexAtPosition:i]); > } > > return stringBuilder.toString(); >diff --git a/Source/WebCore/history/BackForwardItemIdentifier.h b/Source/WebCore/history/BackForwardItemIdentifier.h >index a4ee4403662078871d00c3209458ebefeba7a322..2dae52ce732122bb4126d168aebb6aee1c60fcc6 100644 >--- a/Source/WebCore/history/BackForwardItemIdentifier.h >+++ b/Source/WebCore/history/BackForwardItemIdentifier.h >@@ -28,7 +28,7 @@ > #include "ProcessIdentifier.h" > #include <wtf/DebugUtilities.h> > #include <wtf/Hasher.h> >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -48,10 +48,12 @@ struct BackForwardItemIdentifier { > }; > > #if !LOG_DISABLED >+ > inline const char* BackForwardItemIdentifier::logString() const > { >- return debugString(String::number(processIdentifier.toUInt64()), "-", String::number(itemIdentifier.toUInt64())); >+ return debugString(makeString(processIdentifier.toUInt64(), '-', itemIdentifier.toUInt64())); > } >+ > #endif > > inline bool operator==(const BackForwardItemIdentifier& a, const BackForwardItemIdentifier& b) >diff --git a/Source/WebCore/html/FTPDirectoryDocument.cpp b/Source/WebCore/html/FTPDirectoryDocument.cpp >index 933f387a6f8022468e16749f548f5de99d71c246..6a89c7926512ebc8cc4d7cb81e1210f13cc8c4bd 100644 >--- a/Source/WebCore/html/FTPDirectoryDocument.cpp >+++ b/Source/WebCore/html/FTPDirectoryDocument.cpp >@@ -248,9 +248,9 @@ static String processFileDateString(const FTPTime& fileTime) > String dateString; > > if (fileTime.tm_year > -1) >- dateString = makeString(months[month], ' ', String::number(fileTime.tm_mday), ", ", String::number(fileTime.tm_year)); >+ dateString = makeString(months[month], ' ', fileTime.tm_mday, ", ", fileTime.tm_year); > else >- dateString = makeString(months[month], ' ', String::number(fileTime.tm_mday), ", ", String::number(now.year())); >+ dateString = makeString(months[month], ' ', fileTime.tm_mday, ", ", now.year()); > > return dateString + timeOfDay; > } >diff --git a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >index 7b9c1c322a5cae64b8f5875ae00dab2824d3d66e..b0109b7cb137f72fe554062dc88ef3e93aa6e54d 100644 >--- a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >+++ b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >@@ -2986,7 +2986,7 @@ RefPtr<WebGLUniformLocation> WebGLRenderingContextBase::getUniformLocation(WebGL > info.name = info.name.left(info.name.length() - 3); > // If it's an array, we need to iterate through each element, appending "[index]" to the name. > for (GC3Dint index = 0; index < info.size; ++index) { >- String uniformName = info.name + "[" + String::number(index) + "]"; >+ String uniformName = makeString(info.name, '[', index, ']'); > > if (name == uniformName || name == info.name) > return WebGLUniformLocation::create(program, uniformLocation, info.type); >@@ -5287,10 +5287,9 @@ bool WebGLRenderingContextBase::checkTextureCompleteness(const char* functionNam > RefPtr<WebGLTexture> tex2D; > RefPtr<WebGLTexture> texCubeMap; > if (prepareToDraw) { >- String msg(String("texture bound to texture unit ") + String::number(badTexture) >- + " is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'," >- + " or it is a float/half-float type with linear filtering and without the relevant float/half-float linear extension enabled."); >- printToConsole(MessageLevel::Error, "WebGL: " + String(functionName) + ": " + msg); >+ printToConsole(MessageLevel::Error, makeString("WebGL: ", functionName, ": texture bound to texture unit ", badTexture, >+ " is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'," >+ " or it is a float/half-float type with linear filtering and without the relevant float/half-float linear extension enabled.")); > tex2D = m_blackTexture2D.get(); > texCubeMap = m_blackTextureCubeMap.get(); > } else { >diff --git a/Source/WebCore/inspector/agents/WebConsoleAgent.cpp b/Source/WebCore/inspector/agents/WebConsoleAgent.cpp >index d3d43b6f6fe3e29d94a130a322de532ab9f1b5c1..1359fa6c731cca839445acd37263be47571ff695 100644 >--- a/Source/WebCore/inspector/agents/WebConsoleAgent.cpp >+++ b/Source/WebCore/inspector/agents/WebConsoleAgent.cpp >@@ -148,7 +148,7 @@ void WebConsoleAgent::didReceiveResponse(unsigned long requestIdentifier, const > return; > > if (response.httpStatusCode() >= 400) { >- String message = "Failed to load resource: the server responded with a status of " + String::number(response.httpStatusCode()) + " (" + response.httpStatusText() + ')'; >+ String message = makeString("Failed to load resource: the server responded with a status of ", response.httpStatusCode(), " (", response.httpStatusText(), ')'); > addMessageToConsole(std::make_unique<ConsoleMessage>(MessageSource::Network, MessageType::Log, MessageLevel::Error, message, response.url().string(), 0, 0, nullptr, requestIdentifier)); > } > } >diff --git a/Source/WebCore/loader/WorkerThreadableLoader.cpp b/Source/WebCore/loader/WorkerThreadableLoader.cpp >index 4bad183e08548c47ddd98229ee9e62b4eb49b5cb..f75d305f23e6377164df355d7dffd0dd29e3222f 100644 >--- a/Source/WebCore/loader/WorkerThreadableLoader.cpp >+++ b/Source/WebCore/loader/WorkerThreadableLoader.cpp >@@ -52,8 +52,6 @@ > > namespace WebCore { > >-static const char loadResourceSynchronouslyMode[] = "loadResourceSynchronouslyMode"; >- > WorkerThreadableLoader::WorkerThreadableLoader(WorkerGlobalScope& workerGlobalScope, ThreadableLoaderClient& client, const String& taskMode, ResourceRequest&& request, const ThreadableLoaderOptions& options, const String& referrer) > : m_workerGlobalScope(workerGlobalScope) > , m_workerClientWrapper(ThreadableLoaderClientWrapper::create(client, options.initiator)) >@@ -71,8 +69,7 @@ void WorkerThreadableLoader::loadResourceSynchronously(WorkerGlobalScope& worker > WorkerRunLoop& runLoop = workerGlobalScope.thread().runLoop(); > > // Create a unique mode just for this synchronous resource load. >- String mode = loadResourceSynchronouslyMode; >- mode.append(String::number(runLoop.createUniqueId())); >+ String mode = makeString("loadResourceSynchronouslyMode", runLoop.createUniqueId()); > > auto loader = WorkerThreadableLoader::create(workerGlobalScope, client, mode, WTFMove(request), options, String()); > MessageQueueWaitResult result = MessageQueueMessageReceived; >diff --git a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >index ecf43cbcdaa59682ea4e882db10f95191793e597..8e384693bf5df4a573f7f3fe5088a73c63b4888e 100644 >--- a/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >+++ b/Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp >@@ -664,17 +664,17 @@ void ApplicationCacheGroup::didFailLoadingManifest(ApplicationCacheResourceLoade > break; > case ApplicationCacheResourceLoader::Error::NotFound: > InspectorInstrumentation::didFailLoading(m_frame, m_frame->loader().documentLoader(), m_currentResourceIdentifier, m_frame->loader().cancelledError(m_manifestLoader->resource()->resourceRequest())); >- m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, makeString("Application Cache manifest could not be fetched, because the manifest had a ", String::number(m_manifestLoader->resource()->response().httpStatusCode()), " response.")); >+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, makeString("Application Cache manifest could not be fetched, because the manifest had a ", m_manifestLoader->resource()->response().httpStatusCode(), " response.")); > manifestNotFound(); > break; > case ApplicationCacheResourceLoader::Error::NotOK: > InspectorInstrumentation::didFailLoading(m_frame, m_frame->loader().documentLoader(), m_currentResourceIdentifier, m_frame->loader().cancelledError(m_manifestLoader->resource()->resourceRequest())); >- m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, makeString("Application Cache manifest could not be fetched, because the manifest had a ", String::number(m_manifestLoader->resource()->response().httpStatusCode()), " response.")); >+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, makeString("Application Cache manifest could not be fetched, because the manifest had a ", m_manifestLoader->resource()->response().httpStatusCode(), " response.")); > cacheUpdateFailed(); > break; > case ApplicationCacheResourceLoader::Error::RedirectForbidden: > InspectorInstrumentation::didFailLoading(m_frame, m_frame->loader().documentLoader(), m_currentResourceIdentifier, m_frame->loader().cancelledError(m_manifestLoader->resource()->resourceRequest())); >- m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, makeString("Application Cache manifest could not be fetched, because a redirection was attempted.")); >+ m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, "Application Cache manifest could not be fetched, because a redirection was attempted."_s); > cacheUpdateFailed(); > break; > case ApplicationCacheResourceLoader::Error::CannotCreateResource: >diff --git a/Source/WebCore/page/PageSerializer.cpp b/Source/WebCore/page/PageSerializer.cpp >index 6711603ce226c93b141864d40586175feb81eddc..6c1359b9f65a6c71077706d8088ae3a593fce669 100644 >--- a/Source/WebCore/page/PageSerializer.cpp >+++ b/Source/WebCore/page/PageSerializer.cpp >@@ -321,7 +321,7 @@ URL PageSerializer::urlForBlankFrame(Frame* frame) > auto iter = m_blankFrameURLs.find(frame); > if (iter != m_blankFrameURLs.end()) > return iter->value; >- String url = "wyciwyg://frame/" + String::number(m_blankFrameCounter++); >+ String url = makeString("wyciwyg://frame/", m_blankFrameCounter++); > URL fakeURL({ }, url); > m_blankFrameURLs.add(frame, fakeURL); > return fakeURL; >diff --git a/Source/WebCore/page/PrintContext.cpp b/Source/WebCore/page/PrintContext.cpp >index 6d2b7fc8b3269c39cbec66d630398a081f217778..a902338b9f8c217b5daf6121cf6cb694ea8f0461 100644 >--- a/Source/WebCore/page/PrintContext.cpp >+++ b/Source/WebCore/page/PrintContext.cpp >@@ -29,7 +29,7 @@ > #include "StyleInheritedData.h" > #include "StyleResolver.h" > #include "StyleScope.h" >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -335,7 +335,7 @@ String PrintContext::pageProperty(Frame* frame, const char* propertyName, int pa > if (!strcmp(propertyName, "font-family")) > return style->fontDescription().firstFamily(); > if (!strcmp(propertyName, "size")) >- return String::number(style->pageSize().width.value()) + ' ' + String::number(style->pageSize().height.value()); >+ return makeString(style->pageSize().width.value(), ' ', style->pageSize().height.value()); > > return makeString("pageProperty() unimplemented for: ", propertyName); > } >@@ -350,8 +350,7 @@ String PrintContext::pageSizeAndMarginsInPixels(Frame* frame, int pageNumber, in > IntSize pageSize(width, height); > frame->document()->pageSizeAndMarginsInPixels(pageNumber, pageSize, marginTop, marginRight, marginBottom, marginLeft); > >- return "(" + String::number(pageSize.width()) + ", " + String::number(pageSize.height()) + ") " + >- String::number(marginTop) + ' ' + String::number(marginRight) + ' ' + String::number(marginBottom) + ' ' + String::number(marginLeft); >+ return makeString('(', pageSize.width(), ", ", pageSize.height(), ") ", marginTop, ' ', marginRight, ' ', marginBottom, ' ', marginLeft); > } > > bool PrintContext::beginAndComputePageRectsWithPageSize(Frame& frame, const FloatSize& pageSizeInPixels) >diff --git a/Source/WebCore/page/WheelEventTestTrigger.cpp b/Source/WebCore/page/WheelEventTestTrigger.cpp >index ed549cf4031567f35395b61557e4e0b608a5acc0..37be27aa4a09f8443e81b883d49693ea45d54c59 100644 >--- a/Source/WebCore/page/WheelEventTestTrigger.cpp >+++ b/Source/WebCore/page/WheelEventTestTrigger.cpp >@@ -89,6 +89,7 @@ void WheelEventTestTrigger::removeTestDeferralForReason(ScrollableAreaIdentifier > } > > #if !LOG_DISABLED >+ > static void dumpState(WTF::HashMap<WheelEventTestTrigger::ScrollableAreaIdentifier, WheelEventTestTrigger::DeferTestTriggerReasonSet> reasons) > { > LOG(WheelEventTestTriggers, " WheelEventTestTrigger::dumpState:"); >@@ -97,12 +98,13 @@ static void dumpState(WTF::HashMap<WheelEventTestTrigger::ScrollableAreaIdentifi > StringBuilder reasons; > for (const auto& reason : scrollRegion.value) { > if (!reasons.isEmpty()) >- reasons.append(", "); >- reasons.append(String::number(reason)); >+ reasons.appendLiteral(", "); >+ reasons.appendNumber(reason); > } > LOG(WheelEventTestTriggers, " Reasons: %s", reasons.toString().utf8().data()); > } > } >+ > #endif > > void WheelEventTestTrigger::triggerTestTimerFired() >diff --git a/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm b/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >index 3b274f8b0305861f77a57864ea7dc49f71f52db1..198b29823983f140c733fcab9962f9dd73265d3e 100644 >--- a/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >+++ b/Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm >@@ -458,7 +458,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, makeString(" CPU: ", FormattedNumber::fixedPrecision(data.cpu.last()))); >+ showText(context, 10, 20, colorForLabels, makeString(" CPU: ", FormattedNumber::fixedPrecision(data.cpu.last(), 6, KeepTrailingZeros))); > showText(context, 10, 30, colorForLabels, " Footprint: " + formatByteNumber(memoryFootprint())); > showText(context, 10, 40, colorForLabels, " External: " + formatByteNumber(data.totalExternalSize.last())); > >diff --git a/Source/WebCore/platform/graphics/Color.cpp b/Source/WebCore/platform/graphics/Color.cpp >index 8b10a7269dace52a5df86c2ed4ce2b495eedef86..9532c91ee675c1a0d51d55cacc3ac402183c8fdb 100644 >--- a/Source/WebCore/platform/graphics/Color.cpp >+++ b/Source/WebCore/platform/graphics/Color.cpp >@@ -378,10 +378,7 @@ String Color::cssText() const > builder.appendNumber(static_cast<unsigned char>(blue())); > if (colorHasAlpha) { > builder.appendLiteral(", "); >- >- NumberToStringBuffer buffer; >- bool shouldTruncateTrailingZeros = true; >- builder.append(numberToFixedPrecisionString(alpha() / 255.0f, 6, buffer, shouldTruncateTrailingZeros)); >+ builder.appendNumber(alpha() / 255.0f); > } > > builder.append(')'); >diff --git a/Source/WebCore/platform/graphics/ExtendedColor.cpp b/Source/WebCore/platform/graphics/ExtendedColor.cpp >index 50e3c5c8a425f499ddf4b2a081fbd288f21ca08b..fc27c080e739234f9646252d29c34d227d3e98ea 100644 >--- a/Source/WebCore/platform/graphics/ExtendedColor.cpp >+++ b/Source/WebCore/platform/graphics/ExtendedColor.cpp >@@ -56,19 +56,16 @@ String ExtendedColor::cssText() const > return WTF::emptyString(); > } > >- NumberToStringBuffer buffer; >- bool shouldTruncateTrailingZeros = true; >- >- builder.append(numberToFixedPrecisionString(red(), 6, buffer, shouldTruncateTrailingZeros)); >+ builder.appendNumber(red()); > builder.append(' '); > >- builder.append(numberToFixedPrecisionString(green(), 6, buffer, shouldTruncateTrailingZeros)); >+ builder.appendNumber(green()); > builder.append(' '); > >- builder.append(numberToFixedPrecisionString(blue(), 6, buffer, shouldTruncateTrailingZeros)); >+ builder.appendNumber(blue()); > if (!WTF::areEssentiallyEqual(alpha(), 1.0f)) { > builder.appendLiteral(" / "); >- builder.append(numberToFixedPrecisionString(alpha(), 6, buffer, shouldTruncateTrailingZeros)); >+ builder.appendNumber(alpha()); > } > builder.append(')'); > >diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >index 97788fa09349af2f12049bda0f324795170c7008..8addfb22e0f17807c79d934638bbf8906f3b7cdb 100644 >--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp >@@ -268,7 +268,7 @@ static ASCIILiteral propertyIdToString(AnimatedPropertyID property) > > static String animationIdentifier(const String& animationName, AnimatedPropertyID property, int index, int subIndex) > { >- return animationName + '_' + String::number(property) + '_' + String::number(index) + '_' + String::number(subIndex); >+ return makeString(animationName, '_', static_cast<int>(property), '_', index, '_', subIndex); > } > > static bool animationHasStepsTimingFunction(const KeyframeValueList& valueList, const Animation* anim) >diff --git a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm >index 2aac15523b3791065709ed278b83f872818b06e7..e1ae5d9b7712043206fcefad49e4abf0568078eb 100644 >--- a/Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm >+++ b/Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm >@@ -23,7 +23,7 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#include "config.h" >+#import "config.h" > #import "PlatformCAFilters.h" > > #import "FloatConversion.h" >@@ -32,6 +32,7 @@ > #import <QuartzCore/QuartzCore.h> > #import <pal/spi/cocoa/QuartzCoreSPI.h> > #import <wtf/BlockObjCExceptions.h> >+#import <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -68,10 +69,9 @@ void PlatformCAFilters::setFiltersOnLayer(PlatformLayer* layer, const FilterOper > BEGIN_BLOCK_OBJC_EXCEPTIONS > > RetainPtr<NSMutableArray> array = adoptNS([[NSMutableArray alloc] init]); >- static NeverDestroyed<String> filterNamePrefix(MAKE_STATIC_STRING_IMPL("filter_")); > > for (unsigned i = 0; i < filters.size(); ++i) { >- String filterName = filterNamePrefix.get() + String::number(i); >+ String filterName = makeString("filter_", i); > const FilterOperation& filterOperation = *filters.at(i); > switch (filterOperation.type()) { > case FilterOperation::DEFAULT: >diff --git a/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm b/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm >index c5e2740dac79e66720b6510fe3c7aebf4441c2d3..76e092822e67bd7e275758e50e048cb49d38454b 100644 >--- a/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm >+++ b/Source/WebCore/platform/graphics/cocoa/FontPlatformDataCocoa.mm >@@ -26,7 +26,7 @@ > > #import "SharedBuffer.h" > #import <pal/spi/cocoa/CoreTextSPI.h> >-#import <wtf/text/WTFString.h> >+#import <wtf/text/StringConcatenateNumbers.h> > > #if PLATFORM(IOS_FAMILY) > #import <CoreText/CoreText.h> >@@ -197,12 +197,16 @@ RefPtr<SharedBuffer> FontPlatformData::openTypeTable(uint32_t table) const > } > > #if !LOG_DISABLED >+ > String FontPlatformData::description() const > { >- auto fontDescription = adoptCF(CFCopyDescription(font())); >- return String(fontDescription.get()) + " " + String::number(m_size) >- + (m_syntheticBold ? " synthetic bold" : "") + (m_syntheticOblique ? " synthetic oblique" : "") + (m_orientation == FontOrientation::Vertical ? " vertical orientation" : ""); >+ String fontDescription { adoptCF(CFCopyDescription(font())).get() }; >+ return makeString(fontDescription, ' ', m_size, >+ (m_syntheticBold ? " synthetic bold" : ""), >+ (m_syntheticOblique ? " synthetic oblique" : ""), >+ (m_orientation == FontOrientation::Vertical ? " vertical orientation" : "")); > } >+ > #endif > > } // namespace WebCore >diff --git a/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp b/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp >index ce273f17f1670bbee3e469b8f238540c97b9974a..7dc0f03a287599c12a412b7e9073f6bd6223b71b 100644 >--- a/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp >+++ b/Source/WebCore/platform/mock/mediasource/MockSourceBufferPrivate.cpp >@@ -49,7 +49,7 @@ public: > private: > MockMediaSample(const MockSampleBox& box) > : m_box(box) >- , m_id(String::number(box.trackID())) >+ , m_id(AtomicString::number(box.trackID())) > { > } > >diff --git a/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp b/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp >index b703b64780643540fd4573b713f6dc4dbe9400e2..148e272da1363a9db2ac826768aebcb8523c8fbe 100644 >--- a/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp >+++ b/Source/WebCore/platform/network/cf/SocketStreamHandleImplCFNet.cpp >@@ -673,7 +673,7 @@ void SocketStreamHandleImpl::reportErrorToClient(CFErrorRef error) > if (CFEqual(CFErrorGetDomain(error), kCFErrorDomainOSStatus)) { > const char* descriptionOSStatus = GetMacOSStatusCommentString(static_cast<OSStatus>(errorCode)); > if (descriptionOSStatus && descriptionOSStatus[0] != '\0') >- description = "OSStatus Error " + String::number(errorCode) + ": " + descriptionOSStatus; >+ description = makeString("OSStatus Error ", errorCode, ": ", descriptionOSStatus); > } > > ALLOW_DEPRECATED_DECLARATIONS_END >diff --git a/Source/WebCore/platform/sql/SQLiteDatabase.cpp b/Source/WebCore/platform/sql/SQLiteDatabase.cpp >index d7bc6132b42686de49e58da284d667d97ab73694..7da62e02fbf799f39834c6284f048efadc6bb8c9 100644 >--- a/Source/WebCore/platform/sql/SQLiteDatabase.cpp >+++ b/Source/WebCore/platform/sql/SQLiteDatabase.cpp >@@ -37,7 +37,7 @@ > #include <thread> > #include <wtf/Threading.h> > #include <wtf/text/CString.h> >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -205,7 +205,7 @@ void SQLiteDatabase::setMaximumSize(int64_t size) > LockHolder locker(m_authorizerLock); > enableAuthorizer(false); > >- SQLiteStatement statement(*this, "PRAGMA max_page_count = " + String::number(newMaxPageCount)); >+ SQLiteStatement statement(*this, makeString("PRAGMA max_page_count = ", newMaxPageCount)); > statement.prepare(); > if (statement.step() != SQLITE_ROW) > LOG_ERROR("Failed to set maximum size of database to %lli bytes", static_cast<long long>(size)); >@@ -264,7 +264,7 @@ int64_t SQLiteDatabase::totalSize() > > void SQLiteDatabase::setSynchronous(SynchronousPragma sync) > { >- executeCommand("PRAGMA synchronous = " + String::number(sync)); >+ executeCommand(makeString("PRAGMA synchronous = ", static_cast<int>(sync))); > } > > void SQLiteDatabase::setBusyTimeout(int ms) >diff --git a/Source/WebCore/svg/SVGAngleValue.cpp b/Source/WebCore/svg/SVGAngleValue.cpp >index 59cd76941998bc0813d665aebafbc1109179a780..91f15f67272f9d0506eefa6eb112cecb51614197 100644 >--- a/Source/WebCore/svg/SVGAngleValue.cpp >+++ b/Source/WebCore/svg/SVGAngleValue.cpp >@@ -24,7 +24,7 @@ > > #include "SVGParserUtilities.h" > #include <wtf/MathExtras.h> >-#include <wtf/text/StringView.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -66,11 +66,11 @@ String SVGAngleValue::valueAsString() const > { > switch (m_unitType) { > case SVG_ANGLETYPE_DEG: >- return String::number(m_valueInSpecifiedUnits) + "deg"; >+ return makeString(FormattedNumber::fixedPrecision(m_valueInSpecifiedUnits), "deg"); > case SVG_ANGLETYPE_RAD: >- return String::number(m_valueInSpecifiedUnits) + "rad"; >+ return makeString(FormattedNumber::fixedPrecision(m_valueInSpecifiedUnits), "rad"); > case SVG_ANGLETYPE_GRAD: >- return String::number(m_valueInSpecifiedUnits) + "grad"; >+ return makeString(FormattedNumber::fixedPrecision(m_valueInSpecifiedUnits), "grad"); > case SVG_ANGLETYPE_UNSPECIFIED: > case SVG_ANGLETYPE_UNKNOWN: > return String::number(m_valueInSpecifiedUnits); >diff --git a/Source/WebCore/svg/SVGLengthValue.cpp b/Source/WebCore/svg/SVGLengthValue.cpp >index ae63396fb0eebe3d343b589f66a4d558cd8f6a44..dd2ede14fb717c16a0fb8e602a41ae9874a118ef 100644 >--- a/Source/WebCore/svg/SVGLengthValue.cpp >+++ b/Source/WebCore/svg/SVGLengthValue.cpp >@@ -29,7 +29,7 @@ > #include "SVGParserUtilities.h" > #include <wtf/MathExtras.h> > #include <wtf/NeverDestroyed.h> >-#include <wtf/text/StringView.h> >+#include <wtf/text/StringConcatenateNumbers.h> > #include <wtf/text/TextStream.h> > > namespace WebCore { >@@ -232,7 +232,7 @@ ExceptionOr<void> SVGLengthValue::setValueAsString(const String& string) > > String SVGLengthValue::valueAsString() const > { >- return String::number(m_valueInSpecifiedUnits) + lengthTypeToString(extractType(m_unit)); >+ return makeString(FormattedNumber::fixedPrecision(m_valueInSpecifiedUnits), lengthTypeToString(extractType(m_unit))); > } > > ExceptionOr<void> SVGLengthValue::newValueSpecifiedUnits(unsigned short type, float value) >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 61cff4d054ee4d7e5d1bfe13a52a87319abadef9..c4d3228d140c75bc491bb61a3465ef139612f613 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -1790,7 +1790,7 @@ ExceptionOr<String> Internals::configurationForViewport(float devicePixelRatio, > restrictMinimumScaleFactorToViewportSize(attributes, IntSize(availableWidth, availableHeight), devicePixelRatio); > restrictScaleFactorToInitialScaleIfNotUserScalable(attributes); > >- return String { "viewport size " + String::number(attributes.layoutSize.width()) + "x" + String::number(attributes.layoutSize.height()) + " scale " + String::number(attributes.initialScale) + " with limits [" + String::number(attributes.minimumScale) + ", " + String::number(attributes.maximumScale) + "] and userScalable " + (attributes.userScalable ? "true" : "false") }; >+ return makeString("viewport size ", attributes.layoutSize.width(), 'x', attributes.layoutSize.height(), " scale ", FormattedNumber::fixedPrecision(attributes.initialScale), " with limits [", FormattedNumber::fixedPrecision(attributes.minimumScale), ", ", FormattedNumber::fixedPrecision(attributes.maximumScale), "] and userScalable ", (attributes.userScalable ? "true" : "false")); > } > > ExceptionOr<bool> Internals::wasLastChangeUserEdit(Element& textField) >@@ -3269,8 +3269,7 @@ ExceptionOr<String> Internals::getCurrentCursorInfo() > #if ENABLE(MOUSE_CURSOR_SCALE) > if (cursor.imageScaleFactor() != 1) { > result.appendLiteral(" scale="); >- NumberToStringBuffer buffer; >- result.append(numberToFixedPrecisionString(cursor.imageScaleFactor(), 8, buffer, true)); >+ result.appendNumber(cursor.imageScaleFactor(), 8); > } > #endif > return result.toString(); >@@ -4086,7 +4085,7 @@ void Internals::queueMicroTask(int testNumber) > return; > > auto microtask = std::make_unique<ActiveDOMCallbackMicrotask>(MicrotaskQueue::mainThreadQueue(), *document, [document, testNumber]() { >- document->addConsoleMessage(MessageSource::JS, MessageLevel::Debug, makeString("MicroTask #", String::number(testNumber), " has run.")); >+ document->addConsoleMessage(MessageSource::JS, MessageLevel::Debug, makeString("MicroTask #", testNumber, " has run.")); > }); > > MicrotaskQueue::mainThreadQueue().append(WTFMove(microtask)); >@@ -4114,7 +4113,7 @@ static void appendOffsets(StringBuilder& builder, const Vector<LayoutUnit>& snap > else > justStarting = false; > >- builder.append(String::number(coordinate.toUnsigned())); >+ builder.appendNumber(coordinate.toUnsigned()); > } > builder.appendLiteral(" }"); > } >diff --git a/Source/WebCore/workers/service/ServiceWorkerClientIdentifier.h b/Source/WebCore/workers/service/ServiceWorkerClientIdentifier.h >index b8170f51cf50b5ff8d45bfa9dce5e2c8da787b97..6003a6dd9e4b791e40184853d35175c0b54bea1c 100644 >--- a/Source/WebCore/workers/service/ServiceWorkerClientIdentifier.h >+++ b/Source/WebCore/workers/service/ServiceWorkerClientIdentifier.h >@@ -29,7 +29,7 @@ > > #include "DocumentIdentifier.h" > #include "ServiceWorkerTypes.h" >-#include <wtf/text/WTFString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebCore { > >@@ -39,7 +39,7 @@ struct ServiceWorkerClientIdentifier { > > unsigned hash() const; > >- String toString() const { return String::number(serverConnectionIdentifier.toUInt64()) + "-" + String::number(contextIdentifier.toUInt64()); } >+ String toString() const { return makeString(serverConnectionIdentifier.toUInt64(), '-', contextIdentifier.toUInt64()); } > static Optional<ServiceWorkerClientIdentifier> fromString(StringView); > > template<class Encoder> void encode(Encoder&) const; >diff --git a/Source/WebCore/workers/service/server/RegistrationDatabase.cpp b/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >index b629f4326f9722b167366bba648870a1d6f85e78..55c8fced2983b18d28fd934888ab54a291b105b6 100644 >--- a/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >+++ b/Source/WebCore/workers/service/server/RegistrationDatabase.cpp >@@ -72,7 +72,7 @@ static const String recordsTableSchemaAlternate() > > static inline String databaseFilenameFromVersion(uint64_t version) > { >- return makeString("ServiceWorkerRegistrations-", String::number(version), ".sqlite3"); >+ return makeString("ServiceWorkerRegistrations-", version, ".sqlite3"); > } > > static const String& databaseFilename() >diff --git a/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp b/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >index 9df0d76faf4220c953e7fd5a92bb8ef6c0480f52..30288bf47584c656e1a337d8bfe2cd237f14f9cf 100644 >--- a/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp >@@ -963,7 +963,7 @@ static String escapeForJSON(String s) > > static String escapeIDForJSON(const Optional<uint64_t>& value) > { >- return value ? String::number(value.value()) : String("None"); >+ return value ? String::number(value.value()) : String("None"_s); > }; > > void NetworkResourceLoader::logCookieInformation() const >diff --git a/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp b/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp >index 2560eb3c75d33c164abb0cf720256e6ba32ecc7c..8f4d61c715d3dd5d8f6f7dde4c180084a684fb47 100644 >--- a/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp >+++ b/Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp >@@ -37,6 +37,7 @@ > #include <wtf/RandomNumber.h> > #include <wtf/RunLoop.h> > #include <wtf/text/CString.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebKit { > namespace NetworkCache { >@@ -144,7 +145,7 @@ public: > > static String makeVersionedDirectoryPath(const String& baseDirectoryPath) > { >- String versionSubdirectory = versionDirectoryPrefix + String::number(Storage::version); >+ String versionSubdirectory = makeString(versionDirectoryPrefix, Storage::version); > return FileSystem::pathByAppendingComponent(baseDirectoryPath, versionSubdirectory); > } > >diff --git a/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm b/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm >index f6d6dec303621a7ef3427024c4daf76cbe4a9b2f..712975158960d53423b911e3f80f13b1a2065e8a 100644 >--- a/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm >+++ b/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm >@@ -37,9 +37,9 @@ > #import <WebCore/ResourceError.h> > #import <pal/SessionID.h> > #import <wtf/MainThread.h> >+#import <wtf/text/StringConcatenateNumbers.h> > > namespace WebKit { >-using namespace WebCore; > > void RemoteNetworkingContext::ensureWebsiteDataStoreSession(NetworkProcess& networkProcess, WebsiteDataStoreParameters&& parameters) > { >@@ -58,7 +58,7 @@ void RemoteNetworkingContext::ensureWebsiteDataStoreSession(NetworkProcess& netw > if (!sessionID.isEphemeral() && !parameters.uiProcessCookieStorageIdentifier.isEmpty()) > uiProcessCookieStorage = cookieStorageFromIdentifyingData(parameters.uiProcessCookieStorageIdentifier); > >- networkProcess.ensureSession(sessionID, base + '.' + String::number(sessionID.sessionID()), WTFMove(uiProcessCookieStorage)); >+ networkProcess.ensureSession(sessionID, makeString(base, '.', sessionID.sessionID()), WTFMove(uiProcessCookieStorage)); > > auto* session = networkProcess.storageSession(sessionID); > for (const auto& cookie : parameters.pendingCookies) >diff --git a/Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp b/Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp >index 9fd0df85af87ebb1cb099c694e8e95df71676a6f..04de3dd13ddbd8b666321aa40a45c6b26201392b 100644 >--- a/Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp >+++ b/Source/WebKit/NetworkProcess/webrtc/NetworkMDNSRegister.cpp >@@ -33,9 +33,9 @@ > #include "WebMDNSRegisterMessages.h" > #include <pal/SessionID.h> > #include <wtf/UUID.h> >+#include <wtf/text/StringConcatenateNumbers.h> > > namespace WebKit { >-using namespace WebCore; > > #define RELEASE_LOG_IF_ALLOWED(sessionID, fmt, ...) RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), Network, "%p - NetworkMDNSRegister::" fmt, this, ##__VA_ARGS__) > #define RELEASE_LOG_IF_ALLOWED_IN_CALLBACK(sessionID, fmt, ...) RELEASE_LOG_IF(sessionID.isAlwaysOnLoggingAllowed(), Network, "NetworkMDNSRegister callback - " fmt, ##__VA_ARGS__) >@@ -97,13 +97,13 @@ static void registerMDNSNameCallback(DNSServiceRef, DNSRecordRef record, DNSServ > RELEASE_LOG_IF_ALLOWED_IN_CALLBACK(request->sessionID, "registerMDNSNameCallback with error %d", errorCode); > > if (errorCode) { >- request->connection->send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { request->requestIdentifier, makeUnexpected(MDNSRegisterError::DNSSD) }, 0); >+ request->connection->send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { request->requestIdentifier, makeUnexpected(WebCore::MDNSRegisterError::DNSSD) }, 0); > return; > } > request->connection->send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { request->requestIdentifier, request->name }, 0); > } > >-void NetworkMDNSRegister::registerMDNSName(uint64_t requestIdentifier, PAL::SessionID sessionID, DocumentIdentifier documentIdentifier, const String& ipAddress) >+void NetworkMDNSRegister::registerMDNSName(uint64_t requestIdentifier, PAL::SessionID sessionID, WebCore::DocumentIdentifier documentIdentifier, const String& ipAddress) > { > DNSServiceRef service; > auto iterator = m_services.find(documentIdentifier); >@@ -111,13 +111,13 @@ void NetworkMDNSRegister::registerMDNSName(uint64_t requestIdentifier, PAL::Sess > auto error = DNSServiceCreateConnection(&service); > if (error) { > RELEASE_LOG_IF_ALLOWED(sessionID, "registerMDNSName DNSServiceCreateConnection error %d", error); >- m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(MDNSRegisterError::DNSSD) }, 0); >+ m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(WebCore::MDNSRegisterError::DNSSD) }, 0); > return; > } > error = DNSServiceSetDispatchQueue(service, dispatch_get_main_queue()); > if (error) { > RELEASE_LOG_IF_ALLOWED(sessionID, "registerMDNSName DNSServiceCreateConnection error %d", error); >- m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(MDNSRegisterError::DNSSD) }, 0); >+ m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(WebCore::MDNSRegisterError::DNSSD) }, 0); > return; > } > ASSERT(service); >@@ -125,14 +125,13 @@ void NetworkMDNSRegister::registerMDNSName(uint64_t requestIdentifier, PAL::Sess > } else > service = iterator->value; > >- String baseName = createCanonicalUUIDString(); >- String name = makeString(baseName, String::number(pendingRegistrationRequestCount), ".local"); >+ String name = makeString(createCanonicalUUIDString(), pendingRegistrationRequestCount, ".local"); > > auto ip = inet_addr(ipAddress.utf8().data()); > > if (ip == ( in_addr_t)(-1)) { > RELEASE_LOG_IF_ALLOWED(sessionID, "registerMDNSName inet_addr error"); >- m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(MDNSRegisterError::BadParameter) }, 0); >+ m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(WebCore::MDNSRegisterError::BadParameter) }, 0); > return; > } > >@@ -152,20 +151,22 @@ void NetworkMDNSRegister::registerMDNSName(uint64_t requestIdentifier, PAL::Sess > reinterpret_cast<void*>(pendingRegistrationRequestCount)); > if (error) { > RELEASE_LOG_IF_ALLOWED(sessionID, "registerMDNSName DNSServiceRegisterRecord error %d", error); >- m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(MDNSRegisterError::DNSSD) }, 0); >+ m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(WebCore::MDNSRegisterError::DNSSD) }, 0); > return; > } > pendingRegistrationRequests().add(pendingRegistrationRequestCount++, WTFMove(pendingRequest)); > } >+ > #else >+ > void NetworkMDNSRegister::unregisterMDNSNames(WebCore::DocumentIdentifier) > { > } > >-void NetworkMDNSRegister::registerMDNSName(uint64_t requestIdentifier, PAL::SessionID sessionID, DocumentIdentifier documentIdentifier, const String& ipAddress) >+void NetworkMDNSRegister::registerMDNSName(uint64_t requestIdentifier, PAL::SessionID sessionID, WebCore::DocumentIdentifier documentIdentifier, const String& ipAddress) > { > RELEASE_LOG_IF_ALLOWED(sessionID, "registerMDNSName not implemented"); >- m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(MDNSRegisterError::NotImplemented) }, 0); >+ m_connection.connection().send(Messages::WebMDNSRegister::FinishedRegisteringMDNSName { requestIdentifier, makeUnexpected(WebCore::MDNSRegisterError::NotImplemented) }, 0); > } > > #endif >diff --git a/Source/WebKit/UIProcess/WebPageGroup.cpp b/Source/WebKit/UIProcess/WebPageGroup.cpp >index 6f5ef070abc5acd7ec07c0a22e4009db7be153fe..08bf54bfc7d665bb077497aafac2a9620251714d 100644 >--- a/Source/WebKit/UIProcess/WebPageGroup.cpp >+++ b/Source/WebKit/UIProcess/WebPageGroup.cpp >@@ -73,7 +73,7 @@ static WebPageGroupData pageGroupData(const String& identifier) > if (!identifier.isEmpty()) > data.identifier = identifier; > else >- data.identifier = makeString("__uniquePageGroupID-", String::number(data.pageGroupID)); >+ data.identifier = makeString("__uniquePageGroupID-", data.pageGroupID); > > return data; > } >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 04fcb55e02fd727646b6f6c779de9deebae22edf..a4b0fc70204fb8e652f86a35d90e01f886836fb0 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -1532,7 +1532,7 @@ void WebPageProxy::clearInspectorTargets() > > void WebPageProxy::createInspectorTargets() > { >- String pageTargetId = makeString("page-", String::number(m_pageID)); >+ String pageTargetId = makeString("page-", m_pageID); > m_inspectorController->createInspectorTarget(pageTargetId, Inspector::InspectorTargetType::Page); > } > >diff --git a/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm b/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >index 551ec32a62d56e37a3cf066a55e4bdb1468eddbc..8312084952a5583794fff2344b00e972e4be15d4 100644 >--- a/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >+++ b/Source/WebKit/UIProcess/ios/WKLegacyPDFView.mm >@@ -486,8 +486,7 @@ - (NSURL *)_URLForLinkAnnotation:(UIPDFLinkAnnotation *)linkAnnotation > return [NSURL URLWithString:url.relativeString relativeToURL:documentURL]; > > if (NSUInteger pageNumber = linkAnnotation.pageNumber) { >- String anchorString = "#page"_s; >- anchorString.append(String::number(pageNumber)); >+ String anchorString = makeString("#page", pageNumber); > return [NSURL URLWithString:anchorString relativeToURL:documentURL]; > } > >diff --git a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp >index 49a79b2369b6d4441ea4dad5e4260a8cc16bae71..9cd3a4a26bc5435b5afb0003d3be94a574dc779f 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp >+++ b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundleScriptWorld.cpp >@@ -47,7 +47,7 @@ static WorldMap& allWorlds() > static String uniqueWorldName() > { > static uint64_t uniqueWorldNameNumber = 0; >- return makeString("UniqueWorld_"_s, String::number(uniqueWorldNameNumber++)); >+ return makeString("UniqueWorld_", uniqueWorldNameNumber++); > } > > Ref<InjectedBundleScriptWorld> InjectedBundleScriptWorld::create() >diff --git a/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp b/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp >index f1bea509b865695624e25a5259db3a13a1c24e26..d96a7d7dda9f26d1c656a15cb83d03cf204a7a38 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPageInspectorTarget.cpp >@@ -41,7 +41,7 @@ WebPageInspectorTarget::WebPageInspectorTarget(WebPage& page) > > String WebPageInspectorTarget::identifier() const > { >- return makeString("page-", String::number(m_page.pageID())); >+ return makeString("page-", m_page.pageID()); > } > > void WebPageInspectorTarget::connect(Inspector::FrontendChannel& channel)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194021
:
360581
|
360584
|
360585
|
360586
|
360591
|
360592
|
360595
|
360599
|
360949
|
360951
|
360953
|
360959
|
360960
|
360962
|
360965
|
360966
|
361015
|
361277
|
361279
|
361579
|
361606
|
361609