[webkit-changes] [WebKit/WebKit] a2fbff: Remove StringView::stripWhiteSpace()

Anne van Kesteren noreply at github.com
Sat May 20 23:43:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a2fbff3888aa2a3cf061b40a84bfc108a89a4c33
      https://github.com/WebKit/WebKit/commit/a2fbff3888aa2a3cf061b40a84bfc108a89a4c33
  Author: Anne van Kesteren <annevk at annevk.nl>
  Date:   2023-05-20 (Sat, 20 May 2023)

  Changed paths:
    M Source/WTF/wtf/Assertions.cpp
    M Source/WTF/wtf/text/StringView.cpp
    M Source/WTF/wtf/text/StringView.h
    M Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.cpp
    M Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp
    M Source/WebCore/page/WindowFeatures.cpp
    M Source/WebCore/platform/network/CacheValidation.cpp
    M Source/WebCore/platform/network/HTTPParsers.cpp
    M Source/WebCore/platform/network/MIMEHeader.cpp
    M Source/WebCore/platform/network/ResourceResponseBase.cpp
    M Source/WebCore/platform/sql/SQLiteDatabase.cpp
    M Source/WebCore/platform/xr/PlatformXR.h
    M Source/WebCore/svg/SVGAnimationElement.cpp
    M Source/WebCore/svg/animation/SVGSMILElement.cpp

  Log Message:
  -----------
  Remove StringView::stripWhiteSpace()
https://bugs.webkit.org/show_bug.cgi?id=257086
rdar://109608781

Reviewed by Darin Adler.

This makes all callers use stripLeadingAndTrailingMatchedCharacters()
directly with the same argument.

This is an improvement as stripWhiteSpace() doesn't match
String::stripWhiteSpace() (isUnicodeCompatibleASCIIWhitespace vs
isSpaceOrNewline) and its semantics are likely not what you want: the
web platform primarily uses isASCIIWhitespace.

* Source/WTF/wtf/Assertions.cpp:
* Source/WTF/wtf/text/StringView.cpp:
(WTF::StringView::stripWhiteSpace const): Deleted.
* Source/WTF/wtf/text/StringView.h:
* Source/WebCore/Modules/applicationmanifest/ApplicationManifestParser.cpp:
(WebCore::ApplicationManifestParser::parseDisplay):
(WebCore::ApplicationManifestParser::parseOrientation):
(WebCore::ApplicationManifestParser::parseIcons):
* Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:
(WebCore::LayoutIntegration::printTextForSubtree):
* Source/WebCore/page/WindowFeatures.cpp:
(WebCore::parseDisabledAdaptations):
(WebCore::parseDialogFeaturesMap):
* Source/WebCore/platform/network/CacheValidation.cpp:
(WebCore::collectVaryingRequestHeadersInternal):
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::filenameFromHTTPContentDisposition):
(WebCore::parseXFrameOptionsHeader):
(WebCore::isForbiddenHeader):
* Source/WebCore/platform/network/MIMEHeader.cpp:
(WebCore::retrieveKeyValuePairs):
(WebCore::MIMEHeader::parseContentTransferEncoding):
* Source/WebCore/platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::isAttachment const):
(WebCore::ResourceResponseBase::isAttachmentWithFilename const):
* Source/WebCore/platform/sql/SQLiteDatabase.cpp:
(WebCore::SQLiteDatabase::prepareStatementSlow):
(WebCore::SQLiteDatabase::prepareHeapStatementSlow):
* Source/WebCore/platform/xr/PlatformXR.h:
(PlatformXR::parseSessionFeatureDescriptor):
* Source/WebCore/svg/SVGAnimationElement.cpp:
(WebCore::parseKeyTimes):
* Source/WebCore/svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseOffsetValue):
(WebCore::SVGSMILElement::parseClockValue):
(WebCore::SVGSMILElement::parseCondition):

Canonical link: https://commits.webkit.org/264300@main




More information about the webkit-changes mailing list