[webkit-changes] [WebKit/WebKit] 8763b2: Drop StringView constructors taking in raw pointers
Chris Dumez
noreply at github.com
Sun Mar 24 20:19:21 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 8763b25f5d245877b35f4729bbea078d9d96b0d5
https://github.com/WebKit/WebKit/commit/8763b25f5d245877b35f4729bbea078d9d96b0d5
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-03-24 (Sun, 24 Mar 2024)
Changed paths:
M Source/JavaScriptCore/runtime/ArrayPrototype.cpp
M Source/JavaScriptCore/runtime/ExceptionHelpers.cpp
M Source/JavaScriptCore/runtime/ISO8601.cpp
M Source/JavaScriptCore/runtime/IntlCollator.cpp
M Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp
M Source/JavaScriptCore/runtime/IntlDurationFormat.cpp
M Source/JavaScriptCore/runtime/IntlListFormat.cpp
M Source/JavaScriptCore/runtime/IntlLocale.cpp
M Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
M Source/JavaScriptCore/runtime/JSString.h
M Source/JavaScriptCore/runtime/LiteralParser.cpp
M Source/JavaScriptCore/wasm/WasmIndexOrName.cpp
M Source/WTF/wtf/HexNumber.cpp
M Source/WTF/wtf/HexNumber.h
M Source/WTF/wtf/URL.cpp
M Source/WTF/wtf/URLParser.cpp
M Source/WTF/wtf/cf/CFURLExtras.cpp
M Source/WTF/wtf/text/NullTextBreakIterator.h
M Source/WTF/wtf/text/StringBuilder.h
M Source/WTF/wtf/text/StringCommon.h
M Source/WTF/wtf/text/StringParsingBuffer.h
M Source/WTF/wtf/text/StringView.cpp
M Source/WTF/wtf/text/StringView.h
M Source/WTF/wtf/text/TextBreakIterator.cpp
M Source/WTF/wtf/text/TextBreakIterator.h
M Source/WTF/wtf/text/cf/TextBreakIteratorCF.h
M Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp
M Source/WTF/wtf/text/icu/TextBreakIteratorICU.h
M Source/WTF/wtf/text/icu/UTextProvider.h
M Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp
M Source/WTF/wtf/text/icu/UTextProviderLatin1.h
M Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp
M Source/WTF/wtf/text/icu/UTextProviderUTF16.h
M Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp
M Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
M Source/WebCore/bindings/js/ScriptBufferSourceProvider.h
M Source/WebCore/css/parser/CSSCustomPropertySyntax.cpp
M Source/WebCore/css/parser/CSSParserToken.cpp
M Source/WebCore/editing/TextIterator.cpp
M Source/WebCore/editing/TextIterator.h
M Source/WebCore/editing/VisibleUnits.cpp
M Source/WebCore/html/FTPDirectoryDocument.cpp
M Source/WebCore/html/MediaFragmentURIParser.cpp
M Source/WebCore/html/parser/CSSPreloadScanner.cpp
M Source/WebCore/html/parser/HTMLConstructionSite.cpp
M Source/WebCore/html/parser/HTMLMetaCharsetParser.cpp
M Source/WebCore/html/parser/HTMLParserIdioms.cpp
M Source/WebCore/html/parser/HTMLPreloadScanner.cpp
M Source/WebCore/html/parser/HTMLSrcsetParser.cpp
M Source/WebCore/html/track/VTTScanner.cpp
M Source/WebCore/loader/LinkHeader.cpp
M Source/WebCore/loader/ResourceCryptographicDigest.cpp
M Source/WebCore/page/EventSource.cpp
M Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp
M Source/WebCore/platform/Length.cpp
M Source/WebCore/platform/graphics/ComplexTextController.cpp
M Source/WebCore/platform/graphics/ComplexTextController.h
M Source/WebCore/platform/graphics/ComposedCharacterClusterTextIterator.h
M Source/WebCore/platform/graphics/StringTruncator.cpp
M Source/WebCore/platform/graphics/TextRun.h
M Source/WebCore/platform/graphics/WidthIterator.cpp
M Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp
M Source/WebCore/platform/graphics/cairo/FontCairoHarfbuzzNG.cpp
M Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp
M Source/WebCore/platform/graphics/skia/GlyphPageSkia.cpp
M Source/WebCore/platform/graphics/win/ComplexTextControllerUniscribe.cpp
M Source/WebCore/platform/network/HTTPParsers.cpp
M Source/WebCore/platform/network/RFC8941.cpp
M Source/WebCore/rendering/RenderBlock.cpp
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/TextPainter.cpp
M Source/WebCore/svg/SVGLengthList.cpp
M Source/WebCore/testing/MockCDMFactory.cpp
M Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp
M Source/WebKitLegacy/ios/Misc/WebUIKitSupport.mm
M Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm
M Tools/TestWebKitAPI/Tests/WTF/StringView.cpp
M Tools/TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp
M Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp
M Tools/TestWebKitAPI/Tests/WebCore/MonospaceFontTests.cpp
M Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm
Log Message:
-----------
Drop StringView constructors taking in raw pointers
https://bugs.webkit.org/show_bug.cgi?id=271512
Reviewed by Darin Adler and Sihui Liu.
Drop StringView constructors taking in raw pointers, in favor of the ones taking in a std::span.
* Source/JavaScriptCore/runtime/ArrayPrototype.cpp:
(JSC::JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/ExceptionHelpers.cpp:
(JSC::notAFunctionSourceAppender):
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::parseDuration):
* Source/JavaScriptCore/runtime/IntlCollator.cpp:
(JSC::IntlCollator::checkICULocaleInvariants):
* Source/JavaScriptCore/runtime/IntlDateTimeFormat.cpp:
(JSC::canonicalizeTimeZoneName):
(JSC::IntlDateTimeFormat::initializeDateTimeFormat):
(JSC::IntlDateTimeFormat::formatToParts const):
(JSC::IntlDateTimeFormat::formatRangeToParts):
* Source/JavaScriptCore/runtime/IntlDurationFormat.cpp:
(JSC::IntlDurationFormat::formatToParts const):
* Source/JavaScriptCore/runtime/IntlListFormat.cpp:
(JSC::IntlListFormat::formatToParts const):
* Source/JavaScriptCore/runtime/IntlLocale.cpp:
(JSC::IntlLocale::hourCycles):
* Source/JavaScriptCore/runtime/IntlNumberFormat.cpp:
(JSC::IntlNumberFormat::formatRangeToPartsInternal):
* Source/JavaScriptCore/runtime/JSString.h:
(JSC::JSRopeString::unsafeView const):
(JSC::JSRopeString::viewWithUnderlyingString const):
* Source/JavaScriptCore/runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lex):
(JSC::LiteralParser<CharType>::Lexer::lexStringSlow):
(JSC::LiteralParser<CharType>::parsePrimitiveValue):
* Source/JavaScriptCore/wasm/WasmIndexOrName.cpp:
(JSC::Wasm::makeString):
* Source/WTF/wtf/HexNumber.cpp:
(WTF::printInternal):
* Source/WTF/wtf/HexNumber.h:
(WTF::HexNumberBuffer::span const):
* Source/WTF/wtf/URL.cpp:
(WTF::URL::setHost):
(WTF::URL::setHostAndPort):
* Source/WTF/wtf/URLParser.cpp:
(WTF::URLParser::encodeNonUTF8Query):
(WTF::URLParser::copyURLPartsUntil):
(WTF::URLParser::parsedDataView):
(WTF::URLParser::domainToASCII):
(WTF::URLParser::parseHostAndPort):
* Source/WTF/wtf/cf/CFURLExtras.cpp:
(WTF::isSameOrigin):
* Source/WTF/wtf/text/StringBuilder.h:
(WTF::StringBuilder::operator StringView const):
(WTF::equal):
* Source/WTF/wtf/text/StringCommon.h:
* Source/WTF/wtf/text/StringParsingBuffer.h:
* Source/WTF/wtf/text/StringView.cpp:
(WTF::StringView::GraphemeClusters::Iterator::Impl::operator* const):
(WTF::convertASCIILowercaseAtom):
* Source/WTF/wtf/text/StringView.h:
(WTF::StringView::initialize):
(WTF::StringView::StringView):
(WTF::StringView::substring const):
(WTF::StringView::trim const):
* Source/WTF/wtf/text/TextBreakIterator.cpp:
(WTF::setTextForIterator):
* Source/WTF/wtf/text/TextBreakIterator.h:
(WTF::TextBreakIterator::setText):
(WTF::TextBreakIteratorCache::take):
(WTF::CachedTextBreakIterator::CachedTextBreakIterator):
(WTF::CachedLineBreakIteratorFactory::get):
* Source/WTF/wtf/text/cf/TextBreakIteratorCF.h:
(WTF::TextBreakIteratorCF::setText):
* Source/WTF/wtf/text/cocoa/TextBreakIteratorInternalICUCocoa.cpp:
(WTF::TextBreakIterator::mapModeToBackingIterator):
(WTF::TextBreakIterator::TextBreakIterator):
* Source/WTF/wtf/text/icu/TextBreakIteratorICU.h:
(WTF::TextBreakIteratorICU::TextBreakIteratorICU):
(WTF::TextBreakIteratorICU::setText):
* Source/WTF/wtf/text/icu/UTextProvider.h:
(WTF::initializeContextAwareUTextProvider):
* Source/WTF/wtf/text/icu/UTextProviderLatin1.cpp:
(WTF::openLatin1UTextProvider):
(WTF::openLatin1ContextAwareUTextProvider):
* Source/WTF/wtf/text/icu/UTextProviderLatin1.h:
* Source/WTF/wtf/text/icu/UTextProviderUTF16.cpp:
(WTF::openUTF16ContextAwareUTextProvider):
* Source/WTF/wtf/text/icu/UTextProviderUTF16.h:
* Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:
(WebCore::LibWebRTCCertificateGenerator::RTCCertificateGeneratorCallbackWrapper::process):
* Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:
(WebCore::trimInputSample):
(WebCore::WebSocketHandshake::readStatusLine):
(WebCore::WebSocketHandshake::readHTTPHeaders):
* Source/WebCore/bindings/js/ScriptBufferSourceProvider.h:
* Source/WebCore/css/parser/CSSCustomPropertySyntax.cpp:
(WebCore::CSSCustomPropertySyntax::parseComponent):
* Source/WebCore/css/parser/CSSParserToken.cpp:
(WebCore::mergeIfAdjacent):
* Source/WebCore/editing/TextIterator.cpp:
(WebCore::WordAwareIterator::text const):
(WebCore::SearchBuffer::isWordEndMatch const):
(WebCore::SearchBuffer::isWordStartMatch const):
(WebCore::SearchBuffer::search):
* Source/WebCore/editing/TextIterator.h:
(WebCore::TextIteratorCopyableText::text const):
* Source/WebCore/editing/VisibleUnits.cpp:
(WebCore::wordBreakIteratorForMinOffsetBoundary):
(WebCore::wordBreakIteratorForMaxOffsetBoundary):
(WebCore::backwardSearchForBoundaryWithTextIterator):
(WebCore::forwardSearchForBoundaryWithTextIterator):
* Source/WebCore/html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::append):
* Source/WebCore/html/MediaFragmentURIParser.cpp:
(WebCore::collectFraction):
* Source/WebCore/html/parser/CSSPreloadScanner.cpp:
(WebCore::CSSPreloadScanner::emitRule):
* Source/WebCore/html/parser/HTMLConstructionSite.cpp:
(WebCore::findBreakIndexSlow):
* Source/WebCore/html/parser/HTMLMetaCharsetParser.cpp:
(WebCore::HTMLMetaCharsetParser::processMeta):
* Source/WebCore/html/parser/HTMLParserIdioms.cpp:
(WebCore::parseHTTPRefreshInternal):
* Source/WebCore/html/parser/HTMLPreloadScanner.cpp:
(WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
* Source/WebCore/html/parser/HTMLSrcsetParser.cpp:
(WebCore::appendDescriptorAndReset):
(WebCore::parseImageCandidatesFromSrcsetAttribute):
* Source/WebCore/html/track/VTTScanner.cpp:
(WebCore::VTTScanner::scanDigits):
* Source/WebCore/loader/LinkHeader.cpp:
(WebCore::parseParameterName):
* Source/WebCore/loader/ResourceCryptographicDigest.cpp:
(WebCore::parseCryptographicDigestImpl):
* Source/WebCore/page/EventSource.cpp:
(WebCore::EventSource::parseEventStreamLine):
* Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp:
(WebCore::ContentSecurityPolicySourceList::parseScheme):
(WebCore::ContentSecurityPolicySourceList::parseHost):
(WebCore::ContentSecurityPolicySourceList::parsePath):
(WebCore::ContentSecurityPolicySourceList::parsePort):
* Source/WebCore/platform/Length.cpp:
(WebCore::parseLength):
* Source/WebCore/platform/graphics/ComplexTextController.cpp:
(WebCore::ComplexTextController::offsetForPosition):
(WebCore::ComplexTextController::collectComplexTextRuns):
* Source/WebCore/platform/graphics/ComplexTextController.h:
(WebCore::ComplexTextController::ComplexTextRun::span const):
* Source/WebCore/platform/graphics/ComposedCharacterClusterTextIterator.h:
(WebCore::ComposedCharacterClusterTextIterator::ComposedCharacterClusterTextIterator):
* Source/WebCore/platform/graphics/StringTruncator.cpp:
(WebCore::stringWidth):
* Source/WebCore/platform/graphics/TextRun.h:
(WebCore::TextRun::span8):
(WebCore::TextRun::span16):
(WebCore::TextRun::setText):
* Source/WebCore/platform/graphics/WidthIterator.cpp:
(WebCore::WidthIterator::advance):
* Source/WebCore/platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
(WebCore::InbandTextTrackPrivateAVF::processNativeSamples):
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::trimInputSample):
(WebCore::parseHTTPHeader):
* Source/WebCore/platform/network/RFC8941.cpp:
(RFC8941::parseKey):
* Source/WebCore/rendering/RenderBlock.cpp:
(WebCore::RenderBlock::constructTextRun):
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::capitalize):
(WebCore::RenderText::previousOffset const):
(WebCore::RenderText::previousOffsetForBackwardDeletion const):
(WebCore::RenderText::nextOffset const):
(WebCore::RenderText::stringView const):
* Source/WebCore/rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
* Source/WebCore/svg/SVGLengthList.cpp:
(WebCore::SVGLengthList::parse):
* Source/WebCore/testing/MockCDMFactory.cpp:
(WebCore::MockCDMInstance::setServerCertificate):
* Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp:
(WebKit::readSizeFile):
* Source/WebKitLegacy/mac/Misc/WebKitNSStringExtras.mm:
(-[NSString _web_drawAtPoint:font:textColor:]):
(-[NSString _web_widthWithFont:]):
* Tools/TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
(TestWebKitAPI::TEST_F):
* Tools/TestWebKitAPI/Tests/WebCore/MonospaceFontTests.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(respondToRangeRequests):
Canonical link: https://commits.webkit.org/276616@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list