Leverage StringView in more places to avoid some String allocations
https://bugs.webkit.org/show_bug.cgi?id=239356
Reviewed by Darin Adler.
Source/JavaScriptCore:
- inspector/ContentSearchUtilities.cpp:
(Inspector::ContentSearchUtilities::getRegularExpressionMatchesByLines):
(Inspector::ContentSearchUtilities::findMagicComment):
- runtime/ExceptionHelpers.cpp:
(JSC::invalidParameterInSourceAppender):
(JSC::invalidParameterInstanceofSourceAppender):
- runtime/IntlDateTimeFormat.cpp:
(JSC::IntlDateTimeFormat::formatToParts const):
(JSC::IntlDateTimeFormat::formatRangeToParts):
- runtime/IntlListFormat.cpp:
(JSC::IntlListFormat::formatToParts const):
- runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::formatRangeToPartsInternal):
- tools/FunctionOverrides.cpp:
(JSC::initializeOverrideInfo):
Source/WebCore:
- Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::FetchBodyConsumer::packageFormData):
- Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp:
(WebCore::toRtpCodecCapability):
- Modules/model-element/scenekit/SceneKitModelLoader.mm:
(WebCore::mimeTypeUtilizingFileExtensionOverridingForLocalFiles):
- Modules/plugins/PluginReplacement.h:
(WebCore::ReplacementPlugin::supportsFileExtension const):
- Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::YouTubePluginReplacement::supportsFileExtension):
- Modules/plugins/YouTubePluginReplacement.h:
- animation/KeyframeEffect.cpp:
(WebCore::KeyframeEffect::setPseudoElement):
- css/ContainerQueryParser.cpp:
(WebCore::ContainerQueryParser::consumePlainSizeFeature):
- css/parser/CSSSelectorParser.cpp:
(WebCore::consumeANPlusB):
(WebCore::SecurityContext::parseSandboxPolicy):
- dom/SecurityContext.h:
- fileapi/ThreadableBlobRegistry.cpp:
(WebCore::isBlobURLContainsNullOrigin):
(WebCore::DOMTokenList::updateTokensFromAttributeValue):
- html/DOMTokenList.h:
- html/HTMLMapElement.cpp:
(WebCore::HTMLMapElement::parseAttribute):
- html/HTMLPlugInElement.cpp:
(WebCore::pluginReplacementForType):
- html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::checkAndCreateRegion):
(WebCore::WebVTTParser::checkAndStoreRegion):
(WebCore::WebVTTParser::checkStyleSheet):
(WebCore::WebVTTParser::checkAndStoreStyleSheet):
- html/track/WebVTTParser.h:
- inspector/InspectorStyleSheet.cpp:
(WebCore::StyleSheetHandler::observeProperty):
(WebCore::StyleSheetHandler::observeComment):
- layout/formattingContexts/inline/InlineLineBuilder.cpp:
(WebCore::Layout::toString):
- layout/formattingContexts/inline/display/InlineDisplayContentBuilder.cpp:
(WebCore::Layout::InlineDisplayContentBuilder::appendTextDisplayBox):
- layout/layouttree/LayoutInlineTextBox.h:
(WebCore::Layout::InlineTextBox::content const):
- loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory):
- loader/appcache/ApplicationCacheStorage.h:
- loader/cache/CachedSVGFont.cpp:
(WebCore::CachedSVGFont::getSVGFontById const):
(WebCore::CachedSVGFont::maybeInitializeExternalSVGFontElement):
- loader/cache/CachedSVGFont.h:
- page/Location.cpp:
(WebCore::Location::setHash):
(WebCore::Page::userStyleSheetLocationChanged):
- page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::parse):
- page/UserContentURLPattern.h:
(WebCore::UserContentURLPattern::UserContentURLPattern):
- platform/MIMETypeRegistry.cpp:
(WebCore::typesForCommonExtension):
(WebCore::MIMETypeRegistry::mediaMIMETypeForExtension):
- platform/MIMETypeRegistry.h:
- platform/cocoa/DragImageCocoa.mm:
(WebCore::createDragImageIconForCachedImageFilename):
- platform/graphics/MediaPlayer.cpp:
(WebCore::MediaPlayer::load):
- platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::getUnmangledInfoLog):
- platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processCueAttributes):
- platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
(WebCore::GraphicsContextGLOpenGL::getUnmangledInfoLog):
- platform/network/HTTPParsers.cpp:
(WebCore::parseStructuredFieldValue):
(WebCore::parseRange):
- platform/network/HTTPParsers.h:
- platform/network/MIMEHeader.cpp:
(WebCore::retrieveKeyValuePairs):
- platform/network/ParsedContentType.cpp:
(WebCore::ParsedContentType::setContentType):
- platform/network/ParsedContentType.h:
- rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::textRun const):
Source/WebKit:
- Platform/cocoa/ImageAnalysisUtilities.mm:
(WebKit::makeTextRecognitionResult):
- UIProcess/Cocoa/MediaPermissionUtilities.mm:
(WebKit::visibleDomain):
- WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performJavaScriptURLRequest):
Source/WebKitLegacy/mac:
- Misc/WebUserContentURLPattern.mm:
(-[WebUserContentURLPattern initWithPatternString:]):