[webkit-changes] [WebKit/WebKit] 3539f6: Rename isAllSpecialCharacters() to containsOnly()
Anne van Kesteren
noreply at github.com
Wed May 31 11:59:59 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 3539f609da3d98f6ea798412ecd7de9befee762f
https://github.com/WebKit/WebKit/commit/3539f609da3d98f6ea798412ecd7de9befee762f
Author: Anne van Kesteren <annevk at annevk.nl>
Date: 2023-05-31 (Wed, 31 May 2023)
Changed paths:
M Source/JavaScriptCore/API/JSStringRef.cpp
M Source/JavaScriptCore/jsc.cpp
M Source/JavaScriptCore/runtime/ISO8601.cpp
M Source/JavaScriptCore/runtime/IntlCollator.cpp
M Source/JavaScriptCore/runtime/IntlDisplayNames.cpp
M Source/JavaScriptCore/runtime/IntlLocale.cpp
M Source/JavaScriptCore/runtime/IntlNumberFormat.cpp
M Source/JavaScriptCore/runtime/IntlObject.cpp
M Source/WTF/wtf/URL.cpp
M Source/WTF/wtf/URLHelpers.cpp
M Source/WTF/wtf/URLParser.cpp
M Source/WTF/wtf/cf/URLCF.cpp
M Source/WTF/wtf/text/ASCIIFastPath.h
M Source/WTF/wtf/text/AtomStringImpl.cpp
M Source/WTF/wtf/text/StringBuilder.cpp
M Source/WTF/wtf/text/StringBuilder.h
M Source/WTF/wtf/text/StringImpl.h
M Source/WTF/wtf/text/StringView.h
M Source/WTF/wtf/text/WTFString.h
M Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp
M Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp
M Source/WebCore/Modules/websockets/WebSocketHandshake.cpp
M Source/WebCore/PAL/pal/text/TextCodecLatin1.cpp
M Source/WebCore/PAL/pal/text/TextCodecUTF8.cpp
M Source/WebCore/PAL/pal/text/TextEncodingRegistry.cpp
M Source/WebCore/accessibility/AccessibilityList.cpp
M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
M Source/WebCore/accessibility/AccessibilityRenderObject.cpp
M Source/WebCore/accessibility/AccessibilitySVGElement.cpp
M Source/WebCore/bindings/js/JSDOMConvertStrings.cpp
M Source/WebCore/contentextensions/ContentExtensionsBackend.cpp
M Source/WebCore/contentextensions/URLFilterParser.cpp
M Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp
M Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp
M Source/WebCore/dom/ScriptElement.cpp
M Source/WebCore/editing/ApplyStyleCommand.cpp
M Source/WebCore/editing/MarkupAccumulator.h
M Source/WebCore/editing/markup.cpp
M Source/WebCore/html/HTMLObjectElement.cpp
M Source/WebCore/html/HTMLTablePartElement.cpp
M Source/WebCore/html/HTMLVideoElement.cpp
M Source/WebCore/html/parser/HTMLTreeBuilder.cpp
M Source/WebCore/html/track/WebVTTParser.cpp
M Source/WebCore/inspector/agents/InspectorDOMAgent.cpp
M Source/WebCore/loader/ImageLoader.cpp
M Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp
M Source/WebCore/page/Base64Utilities.cpp
M Source/WebCore/platform/graphics/FourCC.cpp
M Source/WebCore/platform/mac/PublicSuffixMac.mm
M Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp
M Source/WebCore/platform/network/DNS.cpp
M Source/WebCore/platform/network/DNS.h
M Source/WebCore/platform/network/ParsedContentRange.cpp
M Source/WebCore/platform/network/cf/DNSResolveQueueCFNet.cpp
M Source/WebCore/platform/network/cf/ResourceRequestCFNet.h
M Source/WebCore/platform/network/curl/PublicSuffixCurl.cpp
M Source/WebCore/platform/soup/PublicSuffixSoup.cpp
M Source/WebCore/platform/sql/SQLiteStatement.cpp
M Source/WebCore/platform/win/PasteboardWin.cpp
M Source/WebCore/rendering/RenderBlockFlow.cpp
M Source/WebCore/rendering/RenderElement.cpp
M Source/WebCore/rendering/RenderInline.cpp
M Source/WebCore/rendering/RenderLayer.cpp
M Source/WebCore/rendering/RenderText.cpp
M Source/WebCore/rendering/RenderText.h
M Source/WebCore/rendering/TextPainter.cpp
M Source/WebCore/rendering/line/BreakingContext.h
M Source/WebCore/rendering/updating/RenderTreeUpdater.cpp
M Source/WebCore/style/StyleTreeResolver.cpp
M Source/WebKit/NetworkProcess/cache/NetworkCacheKey.cpp
M Source/WebKit/UIProcess/ProvisionalPageProxy.cpp
M Source/WebKit/UIProcess/WebPageProxy.cpp
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
M Source/WebKitLegacy/mac/History/BinaryPropertyList.cpp
M Tools/TestWebKitAPI/Tests/WTF/StringView.cpp
Log Message:
-----------
Rename isAllSpecialCharacters() to containsOnly()
https://bugs.webkit.org/show_bug.cgi?id=257251
rdar://110048833
Reviewed by Darin Adler.
This is a clearer and simpler name. In addition:
- Rename isAllASCII and isAllLatin1 to containsOnlyASCII and
containsOnlyLatin1, respectively. Including when used as variables.
- Inline isAllWhitespace and isAllWhitespaceOrReplacementCharacters as
they were not clear about the type of whitespace and did not carry
their "weight".
- Rename containsOnlyHTMLWhitespace to containsOnlyASCIIWhitespace in
InspectorDOMAgent.
- Rename containsOnlyHTMLWhitespace to containsOnlyCSSWhitespace in
RenderText as it cared about the isCSSSpace definition (though is not
directly using that: FIXME added).
- Rename isAllZeros in DNS to containsOnlyZeros.
* Source/JavaScriptCore/API/JSStringRef.cpp:
(JSStringCreateWithUTF8CString):
* Source/JavaScriptCore/jsc.cpp:
(JSC_DEFINE_HOST_FUNCTION):
* Source/JavaScriptCore/runtime/ISO8601.cpp:
(JSC::ISO8601::handleFraction):
* Source/JavaScriptCore/runtime/IntlCollator.cpp:
(JSC::IntlCollator::compareStrings const):
(JSC::IntlCollator::checkICULocaleInvariants):
* Source/JavaScriptCore/runtime/IntlDisplayNames.cpp:
(JSC::IntlDisplayNames::of const):
* Source/JavaScriptCore/runtime/IntlLocale.cpp:
(JSC::LocaleIDBuilder::initialize):
(JSC::LocaleIDBuilder::overrideLanguageScriptRegion):
(JSC::LocaleIDBuilder::setKeywordValue):
* Source/JavaScriptCore/runtime/IntlNumberFormat.cpp:
(JSC::computeCurrencySortKey):
* Source/JavaScriptCore/runtime/IntlObject.cpp:
(JSC::addScriptlessLocaleIfNeeded):
(JSC::canonicalizeLocaleList):
(JSC::isUnicodeLanguageSubtag):
(JSC::isUnicodeScriptSubtag):
(JSC::isUnicodeRegionSubtag):
(JSC::isUnicodeVariantSubtag):
(JSC::parseVariantCode):
(JSC::isUnicodeExtensionAttribute):
(JSC::isUnicodeExtensionTypeComponent):
(JSC::isUnicodePUExtensionValue):
(JSC::isUnicodeOtherExtensionValue):
(JSC::isUnicodeTValueComponent):
(JSC::isWellFormedCurrencyCode):
* Source/WTF/wtf/URL.cpp:
(WTF::decodeEscapeSequencesFromParsedURL):
(WTF::appendEncodedHostname):
* Source/WTF/wtf/URLHelpers.cpp:
(WTF::URLHelpers::mapHostNames):
* Source/WTF/wtf/URLParser.cpp:
(WTF::URLParser::URLParser):
(WTF::URLParser::domainToASCII):
* Source/WTF/wtf/cf/URLCF.cpp:
(WTF::URL::createCFURL const):
* Source/WTF/wtf/text/ASCIIFastPath.h:
(WTF::containsOnlyASCII):
(WTF::isAllASCII): Deleted.
* Source/WTF/wtf/text/AtomStringImpl.cpp:
(WTF::HashAndUTF8CharactersTranslator::translate):
* Source/WTF/wtf/text/StringBuilder.cpp:
(WTF::StringBuilder::containsOnlyASCII const):
(WTF::StringBuilder::isAllASCII const): Deleted.
* Source/WTF/wtf/text/StringBuilder.h:
* Source/WTF/wtf/text/StringImpl.h:
(WTF::StringImpl::containsOnlyASCII const):
(WTF::StringImpl::containsOnlyLatin1 const):
(WTF::containsOnly):
(WTF::isSpecialCharacter const):
(WTF::StringImpl::isAllASCII const): Deleted.
(WTF::StringImpl::isAllLatin1 const): Deleted.
(WTF::isAllSpecialCharacters): Deleted.
* Source/WTF/wtf/text/StringView.h:
(WTF::StringView::containsOnlyASCII const):
(WTF::isSpecialCharacter const):
(WTF::StringView::isAllASCII const): Deleted.
* Source/WTF/wtf/text/WTFString.h:
* Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::parseParameters):
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::isWellFormedCurrencyCode):
* Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::readHTTPHeaders):
* Source/WebCore/PAL/pal/text/TextCodecLatin1.cpp:
(PAL::TextCodecLatin1::decode):
* Source/WebCore/PAL/pal/text/TextCodecUTF8.cpp:
(PAL::TextCodecUTF8::decode):
* Source/WebCore/PAL/pal/text/TextEncodingRegistry.cpp:
(PAL::atomCanonicalTextEncodingName):
* Source/WebCore/accessibility/AccessibilityList.cpp:
(WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::computeAccessibilityIsIgnored const):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::objectInclusionFromAltText):
(WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored const):
* Source/WebCore/accessibility/AccessibilitySVGElement.cpp:
(WebCore::AccessibilitySVGElement::computeAccessibilityIsIgnored const):
* Source/WebCore/bindings/js/JSDOMConvertStrings.cpp:
(WebCore::throwIfInvalidByteString):
* Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad const):
* Source/WebCore/contentextensions/URLFilterParser.cpp:
(WebCore::ContentExtensions::URLFilterParser::addPattern):
* Source/WebCore/css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::parseGridTemplateAreasRow):
* Source/WebCore/css/parser/CSSPropertyParserWorkerSafe.cpp:
(WebCore::CSSPropertyParserHelpersWorkerSafe::consumeFontFaceSrcURI):
* Source/WebCore/dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestClassicScript):
(WebCore::ScriptElement::requestModuleScript):
(WebCore::ScriptElement::requestImportMap):
* Source/WebCore/editing/ApplyStyleCommand.cpp:
(WebCore::ApplyStyleCommand::applyInlineStyleToPushDown):
* Source/WebCore/editing/MarkupAccumulator.h:
(WebCore::MarkupAccumulator::containsOnlyASCII const):
(WebCore::MarkupAccumulator::isAllASCII const): Deleted.
* Source/WebCore/editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::containsOnlyASCII const):
(WebCore::StyledMarkupAccumulator::isAllASCII const): Deleted.
* Source/WebCore/html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::hasFallbackContent const):
(WebCore::preventsParentObjectFromExposure):
* Source/WebCore/html/HTMLTablePartElement.cpp:
(WebCore::HTMLTablePartElement::collectPresentationalHintsForAttribute):
* Source/WebCore/html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::imageSourceURL const):
* Source/WebCore/html/parser/HTMLTreeBuilder.cpp:
(WebCore::HTMLTreeBuilder::processCharacterBufferForInBody):
(WebCore::HTMLTreeBuilder::defaultForInTableText):
(WebCore::HTMLTreeBuilder::processTokenInForeignContent):
(WebCore::isAllWhitespace): Deleted.
(WebCore::isAllWhitespaceOrReplacementCharacters): Deleted.
* Source/WebCore/html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::checkAndCreateRegion):
(WebCore::WebVTTParser::checkStyleSheet):
* Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:
(WebCore::containsOnlyASCIIWhitespace):
(WebCore::InspectorDOMAgent::innerFirstChild):
(WebCore::InspectorDOMAgent::innerNextSibling):
(WebCore::InspectorDOMAgent::innerPreviousSibling):
(WebCore::InspectorDOMAgent::didInsertDOMNode):
(WebCore::InspectorDOMAgent::didRemoveDOMNode):
(WebCore::InspectorDOMAgent::willDestroyDOMNode):
(WebCore::containsOnlyHTMLWhitespace): Deleted.
* Source/WebCore/loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::decode):
* Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::generateMHTMLData):
* Source/WebCore/page/Base64Utilities.cpp:
(WebCore::Base64Utilities::btoa):
* Source/WebCore/platform/graphics/FourCC.cpp:
(WebCore::FourCC::fromString):
* Source/WebCore/platform/mac/PublicSuffixMac.mm:
(WebCore::topPrivatelyControlledDomain):
* Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp:
(WebCore::addStringToSHA1):
* Source/WebCore/platform/network/DNS.cpp:
(WebCore::IPAddress::containsOnlyZeros const):
(WebCore::IPAddress::isAllZeros const): Deleted.
* Source/WebCore/platform/network/DNS.h:
* Source/WebCore/platform/network/ParsedContentRange.cpp:
(WebCore::parseContentRange):
* Source/WebCore/platform/network/cf/DNSResolveQueueCFNet.cpp:
(WebCore::DNSResolveQueueCFNet::CompletionHandlerWrapper::addIPAddress):
* Source/WebCore/platform/network/cf/ResourceRequestCFNet.h:
(WebCore::httpHeaderValueUsingSuitableEncoding):
* Source/WebCore/platform/network/curl/PublicSuffixCurl.cpp:
(WebCore::topPrivatelyControlledDomain):
* Source/WebCore/platform/soup/PublicSuffixSoup.cpp:
(WebCore::topPrivatelyControlledDomain):
* Source/WebCore/platform/sql/SQLiteStatement.cpp:
(WebCore::SQLiteStatement::bindText):
* Source/WebCore/platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::writeURLToDataObject):
* Source/WebCore/rendering/RenderBlockFlow.cpp:
(WebCore::isVisibleRenderText):
* Source/WebCore/rendering/RenderElement.cpp:
(WebCore::RenderElement::shouldRepaintForStyleDifference const):
* Source/WebCore/rendering/RenderInline.cpp:
(WebCore::isEmptyInline):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::calculateClipRects const):
* Source/WebCore/rendering/RenderText.cpp:
(WebCore::RenderText::RenderText):
(WebCore::RenderText::trimmedPreferredWidths):
(WebCore::RenderText::computePreferredLogicalWidths):
(WebCore::containsOnlyCollapsibleWhitespace):
(WebCore::RenderText::containsOnlyCollapsibleWhitespace const):
(WebCore::containsOnlyPossiblyCollapsibleWhitespace):
(WebCore::RenderText::containsOnlyCSSWhitespace const):
(WebCore::RenderText::setRenderedText):
(WebCore::RenderText::previousOffset const):
(WebCore::RenderText::nextOffset const):
(WebCore::RenderText::computeCanUseSimpleFontCodePath const):
(WebCore::isAllCollapsibleWhitespace): Deleted.
(WebCore::RenderText::isAllCollapsibleWhitespace const): Deleted.
(WebCore::isAllPossiblyCollapsibleWhitespace): Deleted.
(WebCore::RenderText::containsOnlyHTMLWhitespace const): Deleted.
* Source/WebCore/rendering/RenderText.h:
* Source/WebCore/rendering/TextPainter.cpp:
(WebCore::TextPainter::paintTextOrEmphasisMarks):
* Source/WebCore/rendering/line/BreakingContext.h:
(WebCore::BreakingContext::handleText):
* Source/WebCore/rendering/updating/RenderTreeUpdater.cpp:
(WebCore::RenderTreeUpdater::updateRenderTree):
(WebCore::RenderTreeUpdater::textRendererIsNeeded):
* Source/WebCore/style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveComposedTree):
* Source/WebKit/NetworkProcess/cache/NetworkCacheKey.cpp:
(WebKit::NetworkCache::hashString):
* Source/WebKit/UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::logDiagnosticMessageFromWebProcess):
(WebKit::ProvisionalPageProxy::logDiagnosticMessageWithEnhancedPrivacyFromWebProcess):
(WebKit::ProvisionalPageProxy::logDiagnosticMessageWithValueDictionaryFromWebProcess):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::logDiagnosticMessageFromWebProcess):
(WebKit::WebPageProxy::logDiagnosticMessageWithResultFromWebProcess):
(WebKit::WebPageProxy::logDiagnosticMessageWithValueFromWebProcess):
(WebKit::WebPageProxy::logDiagnosticMessageWithEnhancedPrivacyFromWebProcess):
(WebKit::WebPageProxy::logDiagnosticMessageWithValueDictionaryFromWebProcess):
(WebKit::WebPageProxy::logDiagnosticMessageWithDomainFromWebProcess):
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPlatformEditorState const):
* Source/WebKitLegacy/mac/History/BinaryPropertyList.cpp:
(BinaryPropertyListPlan::writeStringObject):
(BinaryPropertyListSerializer::appendStringObject):
* Tools/TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):
Canonical link: https://commits.webkit.org/264748@main
More information about the webkit-changes
mailing list