Remove StringBuilder::appendNumber
https://bugs.webkit.org/show_bug.cgi?id=225732
Reviewed by Sam Weinig.
Source/JavaScriptCore:
(BacktraceFunctor::operator() const): Use append instead of appendNumber.
- API/tests/PingPongStackOverflowTest.cpp:
(PingPongStackOverflowObject_hasInstance): Ditto.
- heap/HeapSnapshotBuilder.cpp:
(JSC::HeapSnapshotBuilder::json): Ditto.
- interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::toString const): Use makeString instead of StringBuilder.
- runtime/ConsoleClient.cpp:
(JSC::appendURLAndPosition): Ditto.
(JSC::ConsoleClient::printConsoleMessageWithArguments): Use append instead of appendNumber.
(JSC::Stringifier::appendStringifiedValue): Ditto.
(JSC::OptionReader::Option::dump const): Ditto.
(JSC::StackFrame::toString const): Use makeString instead of StringBuilder.
Source/WebCore:
- Modules/indexeddb/server/IndexValueStore.cpp:
(WebCore::IDBServer::IndexValueStore::loggingString const):
Use append instead of appendNumber.
- Modules/websockets/WebSocketHandshake.cpp:
(WebCore::hostName): Use makeString instead of StringBuilder.
- contentextensions/CombinedURLFilters.cpp:
(WebCore::ContentExtensions::prefixTreeVertexToString):
Use append instead of appendNumber.
- contentextensions/Term.h:
(WebCore::ContentExtensions::Term::toString const): Ditto.
- css/CSSFontFeatureValue.cpp:
(WebCore::CSSFontFeatureValue::customCSSText const): Ditto.
- css/CSSTimingFunctionValue.cpp:
(WebCore::CSSStepsTimingFunctionValue::customCSSText const): Ditto.
(WebCore::Document::downgradeReferrerToRegistrableDomain): Use
makeString instead of StringBuilder.
- editing/MarkupAccumulator.cpp:
(WebCore::MarkupAccumulator::generateUniquePrefix): Ditto.
- editing/cocoa/DataDetection.mm:
(WebCore::dataDetectorStringForPath): Use append instead of appendNumber.
- html/HTMLAnchorElement.cpp:
(WebCore::appendServerMapMousePosition): Ditto.
- html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::createContext2d): Use makeString
instead of StringBuilder.
(WebCore::HTMLCanvasElement::createImageBuffer const): Ditto.
- loader/ResourceLoadStatistics.cpp:
(WebCore::ResourceLoadStatistics::toString const): Use append instead
of appendNumber.
- loader/SubresourceIntegrity.cpp:
(WebCore::integrityMismatchDescription): Use makeString instead of
StringBuilder.
- page/IntersectionObserver.cpp:
(WebCore::IntersectionObserver::rootMargin const): Use append instead
of appendNumber.
- page/SecurityOriginData.cpp:
(WebCore::SecurityOriginData::databaseIdentifier const): Use makeString
instead of StringBuilder.
(WebCore::Decimal::toString const): Use append instead of appendNumber.
- platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::animationNameForTransition): Use makeString
instead of StringBuilder.
- platform/graphics/ca/TileController.cpp:
(WebCore::TileController::createTileLayer): Ditto.
- platform/graphics/ca/win/PlatformCALayerWin.cpp:
(printTransform): Use single append instead of a run of them.
(printLayer): Ditto, and use append instead of apppendNumber.
(PlatformCALayerWin::layerTreeAsString const): Ditto.
- platform/mediarecorder/MediaRecorderPrivateMock.cpp:
(WebCore::MediaRecorderPrivateMock::generateMockCounterString):
Use append instead of appendNumber.
- platform/network/ProxyServer.cpp:
(WebCore::appendProxyServerString): Ditto.
- rendering/RenderTreeAsText.cpp:
(WebCore::nodePosition): Ditto.
- svg/SVGPathUtilities.cpp:
(WebCore::buildStringFromPath): Ditto.
(WebCore::Internals::parserMetaData): Use makeString instead of
StringBuilder.
(WebCore::appendOffsets): Use append instead of appendNumber.
- testing/MockPageOverlayClient.cpp:
(WebCore::MockPageOverlayClient::drawRect): Use makeString instead
of StringBuilder.
(WebCore::MockPageOverlayClient::mouseEvent): Ditto.
(WebCore::XMLErrors::appendErrorMessage): Use append instead of
appendNumber.
Source/WebDriver:
(WebDriver::SessionHost::sendCommandToBackend): Use append instead
of appendNumber.
- socket/HTTPServerSocket.cpp:
(WebDriver::HTTPRequestHandler::packHTTPMessage const): Ditto.
Source/WebKit:
- NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp:
(WebKit::buildList): Use append instead of appendNumber.
(WebKit::ResourceLoadStatisticsDatabaseStore::findNotVeryPrevalentResources): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::resourceToString const): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::attributionToString): Ditto.
(WebKit::ResourceLoadStatisticsDatabaseStore::privateClickMeasurementToString): Ditto.
- Shared/WebMemorySampler.cpp:
(WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile): Ditto.
- UIProcess/API/glib/WebKitWebView.cpp:
(webkitWebViewRunJavaScriptCallback): Ditto.
- UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::loggingString): Ditto.
- WebProcess/InjectedBundle/API/glib/WebKitWebPage.cpp:
(PageResourceLoadClient::didReceiveResponseForResource): Use makeString instead
of StringBuilder.
- WebProcess/Plugins/PluginView.cpp:
(WebKit::buildHTTPHeaders): Use append instead of appendNumber.
Source/WebKitLegacy/win:
(WebKitStatistics::comClassNameCounts): Use append instead of
appendNumber.
Source/WTF:
We originally added StringBuilder::appendNumber to resolve the ambiguity
between UChar and uint16_t, but that problem was solved long ago and it
is safe to use StringBuilder::append, including the variadic form, on all
types of numbers and we'll get the same results we did with appendNumber.
(WTF::JSONImpl::Value::writeJSON const): Use append instead of appendNumber.
- wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::appendNumber): Deleted.
- wtf/text/StringBuilder.h: Removed appendNumber.
(WTF::TextStream::operator<<): Use append instead of appendNumber.
Tools:
- TestWebKitAPI/Tests/WTF/StringBuilder.cpp:
Test append with a number instead of appendNumber.
- TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
Use append instead of appendNumber.
- WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::dumpResponseDescriptionSuitableForTestResult): Use append instead
of appendNumber.
(WTR::dumpFrameScrollPosition): Ditto.
(WTR::InjectedBundlePage::didFinishDocumentLoadForFrame): Use makeString
instead of StringBuilder.
(WTR::InjectedBundlePage::shouldCacheResponse): Ditto.
- WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::attributesOfElement): Use append instead of appendNumber.
(WTR::AccessibilityUIElement::attributedStringForRange): Ditto.
(WTR::stringAtOffset): Ditto.
|