Title: [295129] trunk
Revision
295129
Author
cdu...@apple.com
Date
2022-06-02 08:51:24 -0700 (Thu, 02 Jun 2022)

Log Message

Drop unnecessary operator==() overloads from StringView
https://bugs.webkit.org/show_bug.cgi?id=241189

Reviewed by Darin Adler.

* Source/_javascript_Core/runtime/IntlRelativeTimeFormat.cpp:
(JSC::relativeTimeUnitType):
* Source/_javascript_Core/runtime/TemporalObject.cpp:
(JSC::temporalUnitType):
* Source/WTF/wtf/text/StringView.h:
(WTF::operator==):
(WTF::operator!=):
* Source/WebCore/Modules/applepay-ams-ui/ApplePayAMSUIPaymentHandler.cpp:
(WebCore::ApplePayAMSUIPaymentHandler::handlesIdentifier):
* Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::ApplePayPaymentHandler::handlesIdentifier):
* Source/WebCore/Modules/cache/DOMCache.cpp:
(WebCore::hasResponseVaryStarHeaderValue):
* Source/WebCore/Modules/cache/DOMCacheEngine.cpp:
(WebCore::DOMCacheEngine::queryCacheMatch):
* Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp:
(WebCore::isValidPathSegment):
(WebCore::resolveRelativeVirtualPath):
(WebCore::DOMFileSystem::evaluatePath):
* Source/WebCore/Modules/fetch/FetchRequest.cpp:
(WebCore::computeReferrer):
* Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp:
(WebCore::createYouTubeURL):
(WebCore::processAndCreateYouTubeURL):
* Source/WebCore/css/SelectorCheckerTestFunctions.h:
(WebCore::containslanguageSubtagMatchingRange):
* Source/WebCore/css/StyleProperties.cpp:
(WebCore::isCSSWideValueKeyword):
* Source/WebCore/css/parser/CSSPropertyParser.cpp:
(WebCore::parseGridTemplateAreasColumnNames):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::initDNSPrefetch):
* Source/WebCore/editing/TextManipulationController.cpp:
(WebCore::ParagraphContentIterator::advanceIteratorNodeAndUpdateText):
* Source/WebCore/fileapi/ThreadableBlobRegistry.cpp:
(WebCore::isBlobURLContainsNullOrigin):
* Source/WebCore/html/FeaturePolicy.cpp:
(WebCore::processOriginItem):
* Source/WebCore/html/HTMLScriptElement.h:
* Source/WebCore/html/parser/CSSPreloadScanner.cpp:
(WebCore::hasValidImportConditions):
* Source/WebCore/loader/CrossOriginAccessControl.cpp:
(WebCore::shouldCrossOriginResourcePolicyCancelLoad):
* Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp:
(WebCore::obtainCrossOriginEmbedderPolicy):
* Source/WebCore/loader/CrossOriginOpenerPolicy.cpp:
(WebCore::obtainCrossOriginOpenerPolicy):
* Source/WebCore/loader/ResourceLoadInfo.cpp:
(WebCore::ContentExtensions::readResourceType):
(WebCore::ContentExtensions::readLoadType):
(WebCore::ContentExtensions::readLoadContext):
* Source/WebCore/mathml/MathMLMencloseElement.cpp:
(WebCore::MathMLMencloseElement::addNotationFlags):
* Source/WebCore/mathml/MathMLPresentationElement.cpp:
(WebCore::MathMLPresentationElement::parseNamedSpace):
* Source/WebCore/page/EventSource.cpp:
(WebCore::EventSource::parseEventStreamLine):
* Source/WebCore/page/FrameTree.cpp:
(WebCore::isSelfTargetFrameName):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture):
* Source/WebCore/platform/LegacySchemeRegistry.cpp:
(WebCore::LegacySchemeRegistry::isUserExtensionScheme):
* Source/WebCore/platform/LocalizedStrings.cpp:
(WebCore::AXARIAContentGroupText):
* Source/WebCore/platform/graphics/HEVCUtilities.cpp:
(WebCore::parseAVCCodecParameters):
(WebCore::parseHEVCCodecParameters):
* Source/WebCore/platform/graphics/cg/UTIRegistry.cpp:
(WebCore::isGIFImageType):
* Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp:
(WebCore::WebMParser::OnTrackEntry):
(WebCore::WebMParser::isSupportedVideoCodec):
(WebCore::WebMParser::isSupportedAudioCodec):
(WebCore::SourceBufferParserWebM::isContentTypeSupported):
* Source/WebCore/platform/graphics/cocoa/VideoTrackPrivateWebM.cpp:
(WebCore::VideoTrackPrivateWebM::codec const):
* Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp:
(WebCore::sessionLoadFailureFromThunder):
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::filenameFromHTTPContentDisposition):
(WebCore::parseCrossOriginResourcePolicyHeader):
* Source/WebCore/platform/network/ParsedContentRange.cpp:
(WebCore::parseContentRange):
* Source/WebCore/platform/network/TimingAllowOrigin.cpp:
(WebCore::passesTimingAllowOriginCheck):
* Source/WebCore/svg/animation/SVGSMILElement.cpp:
(WebCore::SVGSMILElement::parseCondition):
* Source/WebGPU/WGSL/AST/TypeDecl.h:
(WGSL::AST::ParameterizedType::stringViewToKind):
* Source/WebGPU/WGSL/Lexer.cpp:
(WGSL::Lexer<T>::lex):
* Source/WebGPU/WGSL/Parser.cpp:
(WGSL::Parser<Lexer>::parseAttribute):
(WGSL::Parser<Lexer>::parsePrimaryExpression):
* Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm:
(WebKit::PCM::NetworkLoader::start):
* Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp:
(WebKit::CacheStorage::updateVaryInformation):
* Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:
(WebKit::WebsiteDataStore::setResourceLoadStatisticsFirstPartyHostCNAMEDomainForTesting):
(WebKit::WebsiteDataStore::setResourceLoadStatisticsThirdPartyCNAMEDomainForTesting):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::handleEditingCommand):
(WebKit::PDFPlugin::isEditingCommandEnabled):
* Tools/TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WTF/URL.cpp:
(TestWebKitAPI::TEST_F):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm:
(createDirectories):

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

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/runtime/IntlRelativeTimeFormat.cpp (295128 => 295129)


--- trunk/Source/_javascript_Core/runtime/IntlRelativeTimeFormat.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/_javascript_Core/runtime/IntlRelativeTimeFormat.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -211,21 +211,21 @@
 {
     StringView singular = singularUnit(unit);
 
-    if (singular == "second")
+    if (singular == "second"_s)
         return UDAT_REL_UNIT_SECOND;
-    if (singular == "minute")
+    if (singular == "minute"_s)
         return UDAT_REL_UNIT_MINUTE;
-    if (singular == "hour")
+    if (singular == "hour"_s)
         return UDAT_REL_UNIT_HOUR;
-    if (singular == "day")
+    if (singular == "day"_s)
         return UDAT_REL_UNIT_DAY;
-    if (singular == "week")
+    if (singular == "week"_s)
         return UDAT_REL_UNIT_WEEK;
-    if (singular == "month")
+    if (singular == "month"_s)
         return UDAT_REL_UNIT_MONTH;
-    if (singular == "quarter")
+    if (singular == "quarter"_s)
         return UDAT_REL_UNIT_QUARTER;
-    if (singular == "year")
+    if (singular == "year"_s)
         return UDAT_REL_UNIT_YEAR;
 
     return std::nullopt;

Modified: trunk/Source/_javascript_Core/runtime/TemporalObject.cpp (295128 => 295129)


--- trunk/Source/_javascript_Core/runtime/TemporalObject.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/_javascript_Core/runtime/TemporalObject.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -196,25 +196,25 @@
 {
     StringView singular = singularUnit(unit);
 
-    if (singular == "year")
+    if (singular == "year"_s)
         return TemporalUnit::Year;
-    if (singular == "month")
+    if (singular == "month"_s)
         return TemporalUnit::Month;
-    if (singular == "week")
+    if (singular == "week"_s)
         return TemporalUnit::Week;
-    if (singular == "day")
+    if (singular == "day"_s)
         return TemporalUnit::Day;
-    if (singular == "hour")
+    if (singular == "hour"_s)
         return TemporalUnit::Hour;
-    if (singular == "minute")
+    if (singular == "minute"_s)
         return TemporalUnit::Minute;
-    if (singular == "second")
+    if (singular == "second"_s)
         return TemporalUnit::Second;
-    if (singular == "millisecond")
+    if (singular == "millisecond"_s)
         return TemporalUnit::Millisecond;
-    if (singular == "microsecond")
+    if (singular == "microsecond"_s)
         return TemporalUnit::Microsecond;
-    if (singular == "nanosecond")
+    if (singular == "nanosecond"_s)
         return TemporalUnit::Nanosecond;
     
     return std::nullopt;

Modified: trunk/Source/WTF/wtf/text/StringView.h (295128 => 295129)


--- trunk/Source/WTF/wtf/text/StringView.h	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WTF/wtf/text/StringView.h	2022-06-02 15:51:24 UTC (rev 295129)
@@ -240,18 +240,11 @@
 bool startsWithLettersIgnoringASCIICase(StringView, ASCIILiteral);
 
 inline bool operator==(StringView a, StringView b) { return equal(a, b); }
-inline bool operator==(StringView a, const LChar *b);
-inline bool operator==(StringView a, const char *b) { return equal(a, reinterpret_cast<const LChar*>(b)); }
-inline bool operator==(const char* a, StringView b) { return equal(b, reinterpret_cast<const LChar*>(a)); }
 inline bool operator==(StringView a, ASCIILiteral b) { return equal(a, b); }
 inline bool operator==(ASCIILiteral a, StringView b) { return equal(b, a); }
 
 inline bool operator!=(StringView a, StringView b) { return !equal(a, b); }
-inline bool operator!=(StringView a, const LChar* b) { return !equal(a, b); }
-inline bool operator!=(StringView a, const char* b) { return !equal(a, reinterpret_cast<const LChar*>(b)); }
 inline bool operator!=(StringView a, ASCIILiteral b) { return !equal(a, b); }
-inline bool operator!=(const LChar* a, StringView b) { return !equal(b, a); }
-inline bool operator!=(const char* a, StringView b) { return !equal(b, reinterpret_cast<const LChar*>(a)); }
 inline bool operator!=(ASCIILiteral a, StringView b) { return !equal(b, a); }
 
 struct StringViewWithUnderlyingString;

Modified: trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp (295128 => 295129)


--- trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -127,7 +127,7 @@
         return false;
 
     auto& url = ""
-    return url.host() == "apple.com" && url.path() == "/apple-pay";
+    return url.host() == "apple.com"_s && url.path() == "/apple-pay"_s;
 }
 
 bool ApplePayPaymentHandler::hasActiveSession(Document& document)

Modified: trunk/Source/WebCore/Modules/applepay-ams-ui/ApplePayAMSUIPaymentHandler.cpp (295128 => 295129)


--- trunk/Source/WebCore/Modules/applepay-ams-ui/ApplePayAMSUIPaymentHandler.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/Modules/applepay-ams-ui/ApplePayAMSUIPaymentHandler.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -67,7 +67,7 @@
         return false;
 
     auto& url = ""
-    return url.host() == "apple.com" && url.path() == "/ams-ui";
+    return url.host() == "apple.com"_s && url.path() == "/ams-ui"_s;
 }
 
 bool ApplePayAMSUIPaymentHandler::hasActiveSession(Document& document)

Modified: trunk/Source/WebCore/Modules/cache/DOMCache.cpp (295128 => 295129)


--- trunk/Source/WebCore/Modules/cache/DOMCache.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/Modules/cache/DOMCache.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -165,7 +165,7 @@
     auto varyValue = response.headers().internalHeaders().get(WebCore::HTTPHeaderName::Vary);
     bool hasStar = false;
     varyValue.split(',', [&](StringView view) {
-        if (!hasStar && stripLeadingAndTrailingHTTPSpaces(view) == "*")
+        if (!hasStar && stripLeadingAndTrailingHTTPSpaces(view) == "*"_s)
             hasStar = true;
     });
     return hasStar;

Modified: trunk/Source/WebCore/Modules/cache/DOMCacheEngine.cpp (295128 => 295129)


--- trunk/Source/WebCore/Modules/cache/DOMCacheEngine.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/Modules/cache/DOMCacheEngine.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -98,7 +98,7 @@
         if (isVarying)
             return;
         auto nameView = stripLeadingAndTrailingHTTPSpaces(view);
-        if (nameView == "*") {
+        if (nameView == "*"_s) {
             isVarying = true;
             return;
         }

Modified: trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp (295128 => 295129)


--- trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/Modules/entriesapi/DOMFileSystem.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -107,7 +107,7 @@
 // https://wicg.github.io/entries-api/#path-segment
 static bool isValidPathSegment(StringView segment)
 {
-    if (segment.isEmpty() || segment == "." || segment == "..")
+    if (segment.isEmpty() || segment == "."_s || segment == ".."_s)
         return true;
 
     for (unsigned i = 0; i < segment.length(); ++i) {
@@ -201,9 +201,9 @@
 
     for (auto segment : relativeVirtualPath.split('/')) {
         ASSERT(!segment.isEmpty());
-        if (segment == ".")
+        if (segment == "."_s)
             continue;
-        if (segment == "..") {
+        if (segment == ".."_s) {
             if (!virtualPathSegments.isEmpty())
                 virtualPathSegments.removeLast();
             continue;
@@ -229,9 +229,9 @@
 
     Vector<StringView> resolvedComponents;
     for (auto component : virtualPath.split('/')) {
-        if (component == ".")
+        if (component == "."_s)
             continue;
-        if (component == "..") {
+        if (component == ".."_s) {
             if (!resolvedComponents.isEmpty())
                 resolvedComponents.removeLast();
             continue;

Modified: trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp (295128 => 295129)


--- trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/Modules/fetch/FetchRequest.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -61,7 +61,7 @@
     if (!referrerURL.isValid())
         return Exception { TypeError, "Referrer is not a valid URL."_s };
 
-    if (referrerURL.protocolIsAbout() && referrerURL.path() == "client")
+    if (referrerURL.protocolIsAbout() && referrerURL.path() == "client"_s)
         return "client"_str;
 
     if (!(context.securityOrigin() && context.securityOrigin()->canRequest(referrerURL)))

Modified: trunk/Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp (295128 => 295129)


--- trunk/Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/Modules/plugins/YouTubePluginReplacement.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -104,8 +104,8 @@
 static URL createYouTubeURL(StringView videoID, StringView timeID)
 {
     ASSERT(!videoID.isEmpty());
-    ASSERT(videoID != "/");
-    return URL(URL(), makeString("youtube:", videoID, timeID.isEmpty() ? "" : "t=", timeID));
+    ASSERT(videoID != "/"_s);
+    return URL(URL(), makeString("youtube:"_s, videoID, timeID.isEmpty() ? ""_s : "t="_s, timeID));
 }
 
 static HashMap<String, String> queryKeysAndValues(StringView queryString)
@@ -204,7 +204,7 @@
     // Short URL of the form: http://youtu.be/v1d301D
     if (isYouTubeShortenedURL) {
         auto videoID = url.lastPathComponent();
-        if (videoID.isEmpty() || videoID == "/")
+        if (videoID.isEmpty() || videoID == "/"_s)
             return URL();
         return createYouTubeURL(videoID, { });
     }

Modified: trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h (295128 => 295129)


--- trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/css/SelectorCheckerTestFunctions.h	2022-06-02 15:51:24 UTC (rev 295129)
@@ -169,7 +169,7 @@
 {
     unsigned languageSubtagsStartIndex = position;
     unsigned languageSubtagsEndIndex = languageLength;
-    bool isAsteriskRange = range == "*";
+    bool isAsteriskRange = range == "*"_s;
     do {
         if (languageSubtagsStartIndex > 0)
             languageSubtagsStartIndex += 1;

Modified: trunk/Source/WebCore/css/StyleProperties.cpp (295128 => 295129)


--- trunk/Source/WebCore/css/StyleProperties.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/css/StyleProperties.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -64,7 +64,7 @@
 
 static bool isCSSWideValueKeyword(StringView value)
 {
-    return value == "initial" || value == "inherit" || value == "unset" || value == "revert";
+    return value == "initial"_s || value == "inherit"_s || value == "unset"_s || value == "revert"_s;
 }
 
 static bool isNoneValue(const RefPtr<CSSValue>& value)

Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (295128 => 295129)


--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -3504,7 +3504,7 @@
             continue;
         }
         if (character == '.') {
-            if (areaName == ".")
+            if (areaName == "."_s)
                 continue;
             if (!areaName.isEmpty()) {
                 columnNames.append(areaName.toString());
@@ -3513,7 +3513,7 @@
         } else {
             if (!isNameCodePoint(character))
                 return Vector<String>();
-            if (areaName == ".") {
+            if (areaName == "."_s) {
                 columnNames.append(areaName.toString());
                 areaName.clear();
             }

Modified: trunk/Source/WebCore/dom/Document.cpp (295128 => 295129)


--- trunk/Source/WebCore/dom/Document.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/dom/Document.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -6610,7 +6610,7 @@
 void Document::initDNSPrefetch()
 {
     m_haveExplicitlyDisabledDNSPrefetch = false;
-    m_isDNSPrefetchEnabled = settings().dnsPrefetchingEnabled() && securityOrigin().protocol() == "http";
+    m_isDNSPrefetchEnabled = settings().dnsPrefetchingEnabled() && securityOrigin().protocol() == "http"_s;
 
     // Inherit DNS prefetch opt-out from parent frame    
     if (Document* parent = parentDocument()) {

Modified: trunk/Source/WebCore/editing/TextManipulationController.cpp (295128 => 295129)


--- trunk/Source/WebCore/editing/TextManipulationController.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/editing/TextManipulationController.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -232,7 +232,7 @@
         while (shouldAdvanceIteratorPastCurrentNode()) {
             auto iteratorText = m_iterator.text();
             if (m_iterator.range().collapsed()) {
-                if (iteratorText == "\n") {
+                if (iteratorText == "\n"_s) {
                     appendToText(text, stringBuilder);
                     text.append({ });
                 }

Modified: trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp (295128 => 295129)


--- trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -96,7 +96,7 @@
     ASSERT(url.protocolIsBlob());
     unsigned startIndex = url.pathStart();
     unsigned endIndex = url.pathAfterLastSlash();
-    return StringView(url.string()).substring(startIndex, endIndex - startIndex - 1) == "null";
+    return StringView(url.string()).substring(startIndex, endIndex - startIndex - 1) == "null"_s;
 }
 
 void ThreadableBlobRegistry::registerBlobURL(SecurityOrigin* origin, PolicyContainer&& policyContainer, const URL& url, const URL& srcURL)

Modified: trunk/Source/WebCore/html/FeaturePolicy.cpp (295128 => 295129)


--- trunk/Source/WebCore/html/FeaturePolicy.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/html/FeaturePolicy.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -130,19 +130,19 @@
 
     item = item.stripLeadingAndTrailingMatchedCharacters(isHTMLSpace<UChar>);
     // FIXME: Support 'src'.
-    if (item == "'src'")
+    if (item == "'src'"_s)
         return;
 
-    if (item == "*") {
+    if (item == "*"_s) {
         rule.type = FeaturePolicy::AllowRule::Type::All;
         return;
     }
 
-    if (item == "'self'") {
+    if (item == "'self'"_s) {
         rule.allowedList.add(document.securityOrigin().data());
         return;
     }
-    if (item == "'none'") {
+    if (item == "'none'"_s) {
         rule.type = FeaturePolicy::AllowRule::Type::None;
         return;
     }

Modified: trunk/Source/WebCore/html/HTMLScriptElement.h (295128 => 295129)


--- trunk/Source/WebCore/html/HTMLScriptElement.h	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/html/HTMLScriptElement.h	2022-06-02 15:51:24 UTC (rev 295129)
@@ -51,7 +51,7 @@
     using HTMLElement::ref;
     using HTMLElement::deref;
 
-    static bool supports(StringView type) { return type == "classic" || type == "module"; }
+    static bool supports(StringView type) { return type == "classic"_s || type == "module"_s; }
 
 private:
     HTMLScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);

Modified: trunk/Source/WebCore/html/parser/CSSPreloadScanner.cpp (295128 => 295129)


--- trunk/Source/WebCore/html/parser/CSSPreloadScanner.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/html/parser/CSSPreloadScanner.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -217,7 +217,7 @@
     if (end != notFound)
         return end == conditions.length() - 1 && conditions.startsWith("layer("_s);
 
-    return conditions == "layer";
+    return conditions == "layer"_s;
 }
 
 void CSSPreloadScanner::emitRule()

Modified: trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp (295128 => 295129)


--- trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/loader/CrossOriginAccessControl.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -316,7 +316,7 @@
         if (!RegistrableDomain::uncheckedCreateFromHost(origin.host()).matches(response.url()))
             return true;
 #endif
-        if (origin.protocol() == "http" && response.url().protocol() == "https")
+        if (origin.protocol() == "http"_s && response.url().protocol() == "https"_s)
             return true;
     }
 

Modified: trunk/Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp (295128 => 295129)


--- trunk/Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -43,7 +43,7 @@
 {
     auto parseCOEPHeader = [&response](HTTPHeaderName headerName, auto& value, auto& reportingEndpoint) {
         auto coepParsingResult = parseStructuredFieldValue(response.httpHeaderField(headerName));
-        if (coepParsingResult && coepParsingResult->first == "require-corp") {
+        if (coepParsingResult && coepParsingResult->first == "require-corp"_s) {
             value = CrossOriginEmbedderPolicyValue::RequireCORP;
             reportingEndpoint = coepParsingResult->second.get<HashTranslatorASCIILiteral>("report-to"_s);
         }

Modified: trunk/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp (295128 => 295129)


--- trunk/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/loader/CrossOriginOpenerPolicy.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -140,13 +140,13 @@
         if (!coopParsingResult)
             return;
 
-        if (coopParsingResult->first == "same-origin") {
+        if (coopParsingResult->first == "same-origin"_s) {
             auto& coep = ensureCOEP();
             if (coep.value == CrossOriginEmbedderPolicyValue::RequireCORP || (headerName == HTTPHeaderName::CrossOriginOpenerPolicyReportOnly && coep.reportOnlyValue == CrossOriginEmbedderPolicyValue::RequireCORP))
                 value = CrossOriginOpenerPolicyValue::SameOriginPlusCOEP;
             else
                 value = CrossOriginOpenerPolicyValue::SameOrigin;
-        } else if (coopParsingResult->first == "same-origin-allow-popups")
+        } else if (coopParsingResult->first == "same-origin-allow-popups"_s)
             value = CrossOriginOpenerPolicyValue::SameOriginAllowPopups;
 
         reportingEndpoint = coopParsingResult->second.get<HashTranslatorASCIILiteral>("report-to"_s);

Modified: trunk/Source/WebCore/loader/ResourceLoadInfo.cpp (295128 => 295129)


--- trunk/Source/WebCore/loader/ResourceLoadInfo.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/loader/ResourceLoadInfo.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -94,33 +94,33 @@
 
 std::optional<OptionSet<ResourceType>> readResourceType(StringView name)
 {
-    if (name == "document")
+    if (name == "document"_s)
         return { ResourceType::Document };
-    if (name == "image")
+    if (name == "image"_s)
         return { ResourceType::Image };
-    if (name == "style-sheet")
+    if (name == "style-sheet"_s)
         return { ResourceType::StyleSheet };
-    if (name == "script")
+    if (name == "script"_s)
         return { ResourceType::Script };
-    if (name == "font")
+    if (name == "font"_s)
         return { ResourceType::Font };
-    if (name == "raw")
+    if (name == "raw"_s)
         return { { ResourceType::Fetch, ResourceType::WebSocket, ResourceType::Other, ResourceType::Ping } };
-    if (name == "websocket")
+    if (name == "websocket"_s)
         return { ResourceType::WebSocket };
-    if (name == "fetch")
+    if (name == "fetch"_s)
         return { ResourceType::Fetch };
-    if (name == "other")
+    if (name == "other"_s)
         return { { ResourceType::Other, ResourceType::Ping, ResourceType::CSPReport } };
-    if (name == "svg-document")
+    if (name == "svg-document"_s)
         return { ResourceType::SVGDocument };
-    if (name == "media")
+    if (name == "media"_s)
         return { ResourceType::Media };
-    if (name == "popup")
+    if (name == "popup"_s)
         return { ResourceType::Popup };
-    if (name == "ping")
+    if (name == "ping"_s)
         return { ResourceType::Ping };
-    if (name == "csp-report")
+    if (name == "csp-report"_s)
         return { ResourceType::CSPReport };
     return std::nullopt;
 }
@@ -127,9 +127,9 @@
 
 std::optional<OptionSet<LoadType>> readLoadType(StringView name)
 {
-    if (name == "first-party")
+    if (name == "first-party"_s)
         return { LoadType::FirstParty };
-    if (name == "third-party")
+    if (name == "third-party"_s)
         return { LoadType::ThirdParty };
     return std::nullopt;
 }
@@ -136,9 +136,9 @@
 
 std::optional<OptionSet<LoadContext>> readLoadContext(StringView name)
 {
-    if (name == "top-frame")
+    if (name == "top-frame"_s)
         return { LoadContext::TopFrame };
-    if (name == "child-frame")
+    if (name == "child-frame"_s)
         return { LoadContext::ChildFrame };
     return std::nullopt;
 }

Modified: trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp (295128 => 295129)


--- trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/mathml/MathMLMencloseElement.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -62,41 +62,41 @@
 void MathMLMencloseElement::addNotationFlags(StringView notation)
 {
     ASSERT(m_notationFlags);
-    if (notation == "longdiv") {
+    if (notation == "longdiv"_s) {
         addNotation(LongDiv);
-    } else if (notation == "roundedbox") {
+    } else if (notation == "roundedbox"_s) {
         addNotation(RoundedBox);
-    } else if (notation == "circle") {
+    } else if (notation == "circle"_s) {
         addNotation(Circle);
-    } else if (notation == "left") {
+    } else if (notation == "left"_s) {
         addNotation(Left);
-    } else if (notation == "right") {
+    } else if (notation == "right"_s) {
         addNotation(Right);
-    } else if (notation == "top") {
+    } else if (notation == "top"_s) {
         addNotation(Top);
-    } else if (notation == "bottom") {
+    } else if (notation == "bottom"_s) {
         addNotation(Bottom);
-    } else if (notation == "updiagonalstrike") {
+    } else if (notation == "updiagonalstrike"_s) {
         addNotation(UpDiagonalStrike);
-    } else if (notation == "downdiagonalstrike") {
+    } else if (notation == "downdiagonalstrike"_s) {
         addNotation(DownDiagonalStrike);
-    } else if (notation == "verticalstrike") {
+    } else if (notation == "verticalstrike"_s) {
         addNotation(VerticalStrike);
-    } else if (notation == "horizontalstrike") {
+    } else if (notation == "horizontalstrike"_s) {
         addNotation(HorizontalStrike);
-    } else if (notation == "updiagonalarrow") {
+    } else if (notation == "updiagonalarrow"_s) {
         addNotation(UpDiagonalArrow);
-    } else if (notation == "phasorangle") {
+    } else if (notation == "phasorangle"_s) {
         addNotation(PhasorAngle);
-    } else if (notation == "box") {
+    } else if (notation == "box"_s) {
         addNotation(Left);
         addNotation(Right);
         addNotation(Top);
         addNotation(Bottom);
-    } else if (notation == "actuarial") {
+    } else if (notation == "actuarial"_s) {
         addNotation(Right);
         addNotation(Top);
-    } else if (notation == "madruwb") {
+    } else if (notation == "madruwb"_s) {
         addNotation(Right);
         addNotation(Bottom);
     }

Modified: trunk/Source/WebCore/mathml/MathMLPresentationElement.cpp (295128 => 295129)


--- trunk/Source/WebCore/mathml/MathMLPresentationElement.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/mathml/MathMLPresentationElement.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -250,33 +250,33 @@
 {
     // Named space values are case-sensitive.
     int namedSpaceValue;
-    if (string == "veryverythinmathspace")
+    if (string == "veryverythinmathspace"_s)
         namedSpaceValue = 1;
-    else if (string == "verythinmathspace")
+    else if (string == "verythinmathspace"_s)
         namedSpaceValue = 2;
-    else if (string == "thinmathspace")
+    else if (string == "thinmathspace"_s)
         namedSpaceValue = 3;
-    else if (string == "mediummathspace")
+    else if (string == "mediummathspace"_s)
         namedSpaceValue = 4;
-    else if (string == "thickmathspace")
+    else if (string == "thickmathspace"_s)
         namedSpaceValue = 5;
-    else if (string == "verythickmathspace")
+    else if (string == "verythickmathspace"_s)
         namedSpaceValue = 6;
-    else if (string == "veryverythickmathspace")
+    else if (string == "veryverythickmathspace"_s)
         namedSpaceValue = 7;
-    else if (string == "negativeveryverythinmathspace")
+    else if (string == "negativeveryverythinmathspace"_s)
         namedSpaceValue = -1;
-    else if (string == "negativeverythinmathspace")
+    else if (string == "negativeverythinmathspace"_s)
         namedSpaceValue = -2;
-    else if (string == "negativethinmathspace")
+    else if (string == "negativethinmathspace"_s)
         namedSpaceValue = -3;
-    else if (string == "negativemediummathspace")
+    else if (string == "negativemediummathspace"_s)
         namedSpaceValue = -4;
-    else if (string == "negativethickmathspace")
+    else if (string == "negativethickmathspace"_s)
         namedSpaceValue = -5;
-    else if (string == "negativeverythickmathspace")
+    else if (string == "negativeverythickmathspace"_s)
         namedSpaceValue = -6;
-    else if (string == "negativeveryverythickmathspace")
+    else if (string == "negativeveryverythickmathspace"_s)
         namedSpaceValue = -7;
     else
         return Length();

Modified: trunk/Source/WebCore/page/EventSource.cpp (295128 => 295129)


--- trunk/Source/WebCore/page/EventSource.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/page/EventSource.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -368,17 +368,17 @@
     position += step;
     unsigned valueLength = lineLength - step;
 
-    if (field == "data") {
+    if (field == "data"_s) {
         m_data.append(&m_receiveBuffer[position], valueLength);
         m_data.append('\n');
-    } else if (field == "event")
+    } else if (field == "event"_s)
         m_eventName = { &m_receiveBuffer[position], valueLength };
-    else if (field == "id") {
+    else if (field == "id"_s) {
         StringView parsedEventId = { &m_receiveBuffer[position], valueLength };
         constexpr UChar nullCharacter = '\0';
         if (!parsedEventId.contains(nullCharacter))
             m_currentlyParsedEventId = parsedEventId.toString();
-    } else if (field == "retry") {
+    } else if (field == "retry"_s) {
         if (!valueLength)
             m_reconnectDelay = defaultReconnectDelay;
         else {

Modified: trunk/Source/WebCore/page/FrameTree.cpp (295128 => 295129)


--- trunk/Source/WebCore/page/FrameTree.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/page/FrameTree.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -483,7 +483,7 @@
 bool isSelfTargetFrameName(StringView name)
 {
     // FIXME: Some day we should remove _current, which is not part of the HTML specification.
-    return name.isEmpty() || equalIgnoringASCIICase(name, "_self"_s) || name == "_current";
+    return name.isEmpty() || equalIgnoringASCIICase(name, "_self"_s) || name == "_current"_s;
 }
 
 bool isTopTargetFrameName(StringView name)

Modified: trunk/Source/WebCore/page/Quirks.cpp (295128 => 295129)


--- trunk/Source/WebCore/page/Quirks.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/page/Quirks.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -1447,7 +1447,7 @@
 
 bool Quirks::shouldAllowNavigationToCustomProtocolWithoutUserGesture(StringView protocol, const SecurityOriginData& requesterOrigin)
 {
-    return protocol == "msteams" && (requesterOrigin.host == "teams.live.com" || requesterOrigin.host == "teams.microsoft.com");
+    return protocol == "msteams"_s && (requesterOrigin.host == "teams.live.com" || requesterOrigin.host == "teams.microsoft.com");
 }
 
 #if ENABLE(IMAGE_ANALYSIS)

Modified: trunk/Source/WebCore/platform/LegacySchemeRegistry.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/LegacySchemeRegistry.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/LegacySchemeRegistry.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -513,7 +513,7 @@
 {
     // FIXME: Remove this once Safari has adopted WKWebViewConfiguration._corsDisablingPatterns
 #if PLATFORM(MAC)
-    if (scheme == "safari-extension")
+    if (scheme == "safari-extension"_s)
         return true;
 #else
     UNUSED_PARAM(scheme);

Modified: trunk/Source/WebCore/platform/LocalizedStrings.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/LocalizedStrings.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/LocalizedStrings.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -657,47 +657,47 @@
 
 String AXARIAContentGroupText(StringView ariaType)
 {
-    if (ariaType == "ARIAApplicationAlert")
+    if (ariaType == "ARIAApplicationAlert"_s)
         return WEB_UI_STRING("alert", "An ARIA accessibility group that acts as an alert.");
-    if (ariaType == "ARIAApplicationAlertDialog")
+    if (ariaType == "ARIAApplicationAlertDialog"_s)
         return WEB_UI_STRING("web alert dialog", "An ARIA accessibility group that acts as an alert dialog.");
-    if (ariaType == "ARIAApplicationDialog")
+    if (ariaType == "ARIAApplicationDialog"_s)
         return WEB_UI_STRING("web dialog", "An ARIA accessibility group that acts as an dialog.");
-    if (ariaType == "ARIAApplicationLog")
+    if (ariaType == "ARIAApplicationLog"_s)
         return WEB_UI_STRING("log", "An ARIA accessibility group that acts as a console log.");
-    if (ariaType == "ARIAApplicationMarquee")
+    if (ariaType == "ARIAApplicationMarquee"_s)
         return WEB_UI_STRING("marquee", "An ARIA accessibility group that acts as a marquee.");
-    if (ariaType == "ARIAApplicationStatus")
+    if (ariaType == "ARIAApplicationStatus"_s)
         return WEB_UI_STRING("application status", "An ARIA accessibility group that acts as a status update.");
-    if (ariaType == "ARIAApplicationTimer")
+    if (ariaType == "ARIAApplicationTimer"_s)
         return WEB_UI_STRING("timer", "An ARIA accessibility group that acts as an updating timer.");
-    if (ariaType == "ARIADocument")
+    if (ariaType == "ARIADocument"_s)
         return WEB_UI_STRING("document", "An ARIA accessibility group that acts as a document.");
-    if (ariaType == "ARIADocumentArticle")
+    if (ariaType == "ARIADocumentArticle"_s)
         return WEB_UI_STRING("article", "An ARIA accessibility group that acts as an article.");
-    if (ariaType == "ARIADocumentNote")
+    if (ariaType == "ARIADocumentNote"_s)
         return WEB_UI_STRING("note", "An ARIA accessibility group that acts as a note in a document.");
-    if (ariaType == "ARIAWebApplication")
+    if (ariaType == "ARIAWebApplication"_s)
         return WEB_UI_STRING("web application", "An ARIA accessibility group that acts as an application.");
-    if (ariaType == "ARIALandmarkBanner")
+    if (ariaType == "ARIALandmarkBanner"_s)
         return WEB_UI_STRING("banner", "An ARIA accessibility group that acts as a banner.");
-    if (ariaType == "ARIALandmarkComplementary")
+    if (ariaType == "ARIALandmarkComplementary"_s)
         return WEB_UI_STRING("complementary", "An ARIA accessibility group that acts as a region of complementary information.");
-    if (ariaType == "ARIALandmarkContentInfo")
+    if (ariaType == "ARIALandmarkContentInfo"_s)
         return WEB_UI_STRING("content information", "An ARIA accessibility group that contains content.");
-    if (ariaType == "ARIALandmarkMain")
+    if (ariaType == "ARIALandmarkMain"_s)
         return WEB_UI_STRING("main", "An ARIA accessibility group that is the main portion of the website.");
-    if (ariaType == "ARIALandmarkNavigation")
+    if (ariaType == "ARIALandmarkNavigation"_s)
         return WEB_UI_STRING("navigation", "An ARIA accessibility group that contains the main navigation elements of a website.");
-    if (ariaType == "ARIALandmarkRegion")
+    if (ariaType == "ARIALandmarkRegion"_s)
         return WEB_UI_STRING("region", "An ARIA accessibility group that acts as a distinct region in a document.");
-    if (ariaType == "ARIALandmarkSearch")
+    if (ariaType == "ARIALandmarkSearch"_s)
         return WEB_UI_STRING("search", "An ARIA accessibility group that contains a search feature of a website.");
-    if (ariaType == "ARIAUserInterfaceTooltip")
+    if (ariaType == "ARIAUserInterfaceTooltip"_s)
         return WEB_UI_STRING("tooltip", "An ARIA accessibility group that acts as a tooltip.");
-    if (ariaType == "ARIATabPanel")
+    if (ariaType == "ARIATabPanel"_s)
         return WEB_UI_STRING("tab panel", "An ARIA accessibility group that contains the content of a tab.");
-    if (ariaType == "ARIADocumentMath")
+    if (ariaType == "ARIADocumentMath"_s)
         return WEB_UI_STRING("math", "An ARIA accessibility group that contains mathematical symbols.");
     return String();
 }

Modified: trunk/Source/WebCore/platform/graphics/HEVCUtilities.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/graphics/HEVCUtilities.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/graphics/HEVCUtilities.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -50,7 +50,7 @@
 
     // Codec identifier: legal values are specified in ISO/IEC 14496-15:2014, section 8:
     auto codecName = *nextElement;
-    if (codecName != "avc1")
+    if (codecName != "avc1"_s)
         return std::nullopt;
 
     if (++nextElement == codecSplit.end())
@@ -132,9 +132,9 @@
 
     // Codec identifier: legal values are specified in ISO/IEC 14496-15:2014, section 8:
     auto codecName = *nextElement;
-    if (codecName == "hvc1")
+    if (codecName == "hvc1"_s)
         parameters.codec = HEVCParameters::Codec::Hvc1;
-    else if (codecName == "hev1")
+    else if (codecName == "hev1"_s)
         parameters.codec = HEVCParameters::Codec::Hev1;
     else
         return std::nullopt;

Modified: trunk/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/graphics/cg/UTIRegistry.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -111,7 +111,7 @@
 
 bool isGIFImageType(StringView imageType)
 {
-    return imageType == "com.compuserve.gif";
+    return imageType == "com.compuserve.gif"_s;
 }
 
 }

Modified: trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -861,19 +861,19 @@
     StringView codecString { trackEntry.codec_id.value().data(), (unsigned)trackEntry.codec_id.value().length() };
     auto track = [&]() -> UniqueRef<TrackData> {
 #if ENABLE(VP9)
-        if (codecString == "V_VP9" && isVP9DecoderAvailable())
+        if (codecString == "V_VP9"_s && isVP9DecoderAvailable())
             return VideoTrackData::create(CodecType::VP9, trackEntry, *this);
-        if (codecString == "V_VP8" && isVP8DecoderAvailable())
+        if (codecString == "V_VP8"_s && isVP8DecoderAvailable())
             return VideoTrackData::create(CodecType::VP8, trackEntry, *this);
 #endif
 
 #if ENABLE(VORBIS)
-        if (codecString == "A_VORBIS" && isVorbisDecoderAvailable())
+        if (codecString == "A_VORBIS"_s && isVorbisDecoderAvailable())
             return AudioTrackData::create(CodecType::Vorbis, trackEntry, *this);
 #endif
 
 #if ENABLE(OPUS)
-        if (codecString == "A_OPUS" && isOpusDecoderAvailable())
+        if (codecString == "A_OPUS"_s && isOpusDecoderAvailable())
             return AudioTrackData::create(CodecType::Opus, trackEntry, *this);
 #endif
         return TrackData::create(CodecType::Unsupported, trackEntry, *this);
@@ -1255,12 +1255,12 @@
 
 bool WebMParser::isSupportedVideoCodec(StringView name)
 {
-    return name == "V_VP8" || name == "V_VP9";
+    return name == "V_VP8"_s || name == "V_VP9"_s;
 }
 
 bool WebMParser::isSupportedAudioCodec(StringView name)
 {
-    return name == "A_VORBIS" || name == "A_OPUS";
+    return name == "A_VORBIS"_s || name == "A_OPUS"_s;
 }
 
 SourceBufferParserWebM::SourceBufferParserWebM()
@@ -1327,7 +1327,7 @@
 #endif // ENABLE(VP9)
 
 #if ENABLE(VORBIS)
-        if (codec == "vorbis") {
+        if (codec == "vorbis"_s) {
             if (!isVorbisDecoderAvailable())
                 return MediaPlayerEnums::SupportsType::IsNotSupported;
 
@@ -1336,7 +1336,7 @@
 #endif // ENABLE(VORBIS)
 
 #if ENABLE(OPUS)
-        if (codec == "opus") {
+        if (codec == "opus"_s) {
             if (!isOpusDecoderAvailable())
                 return MediaPlayerEnums::SupportsType::IsNotSupported;
 

Modified: trunk/Source/WebCore/platform/graphics/cocoa/VideoTrackPrivateWebM.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/graphics/cocoa/VideoTrackPrivateWebM.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/graphics/cocoa/VideoTrackPrivateWebM.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -96,10 +96,10 @@
     StringView codecID { m_track.codec_id.value().data(), (unsigned)m_track.codec_id.value().length() };
 
     // TODO: Specific codec parameters are parsed out of the sample header; they aren't typically contained in the WebM Track element.
-    if (codecID == "V_VP9")
+    if (codecID == "V_VP9"_s)
         return "vp09"_s;
 
-    if (codecID == "V_VP8")
+    if (codecID == "V_VP8"_s)
         return "vp08"_s;
 
     return emptyString();

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -79,13 +79,13 @@
 
 static CDMInstanceSession::SessionLoadFailure sessionLoadFailureFromThunder(const StringView& loadStatus)
 {
-    if (loadStatus == "None")
+    if (loadStatus == "None"_s)
         return CDMInstanceSession::SessionLoadFailure::None;
-    if (loadStatus == "SessionNotFound")
+    if (loadStatus == "SessionNotFound"_s)
         return CDMInstanceSession::SessionLoadFailure::NoSessionData;
-    if (loadStatus == "MismatchedSessionType")
+    if (loadStatus == "MismatchedSessionType"_s)
         return CDMInstanceSession::SessionLoadFailure::MismatchedSessionType;
-    if (loadStatus == "QuotaExceeded")
+    if (loadStatus == "QuotaExceeded"_s)
         return CDMInstanceSession::SessionLoadFailure::QuotaExceeded;
     return CDMInstanceSession::SessionLoadFailure::Other;
 }

Modified: trunk/Source/WebCore/platform/network/HTTPParsers.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/network/HTTPParsers.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -341,7 +341,7 @@
 
         auto key = keyValuePair.left(valueStartPos).stripWhiteSpace();
 
-        if (key.isEmpty() || key != "filename")
+        if (key.isEmpty() || key != "filename"_s)
             continue;
         
         auto value = keyValuePair.substring(valueStartPos + 1).stripWhiteSpace();
@@ -1061,13 +1061,13 @@
     if (strippedHeader.isEmpty())
         return CrossOriginResourcePolicy::None;
 
-    if (strippedHeader == "same-origin")
+    if (strippedHeader == "same-origin"_s)
         return CrossOriginResourcePolicy::SameOrigin;
 
-    if (strippedHeader == "same-site")
+    if (strippedHeader == "same-site"_s)
         return CrossOriginResourcePolicy::SameSite;
 
-    if (strippedHeader == "cross-origin")
+    if (strippedHeader == "cross-origin"_s)
         return CrossOriginResourcePolicy::CrossOrigin;
 
     return CrossOriginResourcePolicy::Invalid;

Modified: trunk/Source/WebCore/platform/network/ParsedContentRange.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/network/ParsedContentRange.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/network/ParsedContentRange.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -99,7 +99,7 @@
     lastBytePosition = *optionalLastBytePosition;
 
     auto instanceString = headerValue.substring(instanceLengthSeparatorToken + 1);
-    if (instanceString == "*")
+    if (instanceString == "*"_s)
         instanceLength = ParsedContentRange::unknownLength;
     else {
         if (!instanceString.isAllSpecialCharacters<isASCIIDigit>())

Modified: trunk/Source/WebCore/platform/network/TimingAllowOrigin.cpp (295128 => 295129)


--- trunk/Source/WebCore/platform/network/TimingAllowOrigin.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/platform/network/TimingAllowOrigin.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -43,7 +43,7 @@
     const auto& securityOrigin = initiatorSecurityOrigin.toString();
     for (auto originWithSpace : StringView(timingAllowOriginString).split(',')) {
         auto origin = stripLeadingAndTrailingHTTPSpaces(originWithSpace);
-        if (origin == "*" || origin == securityOrigin)
+        if (origin == "*"_s || origin == securityOrigin)
             return true;
     }
 

Modified: trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp (295128 => 295129)


--- trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebCore/svg/animation/SVGSMILElement.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -424,7 +424,7 @@
         repeats = *parsedRepeat;
         nameString = "repeat"_s;
         type = Condition::EventBase;
-    } else if (nameView == "begin" || nameView == "end") {
+    } else if (nameView == "begin"_s || nameView == "end"_s) {
         if (baseID.isEmpty())
             return false;
         type = Condition::Syncbase;

Modified: trunk/Source/WebGPU/WGSL/AST/TypeDecl.h (295128 => 295129)


--- trunk/Source/WebGPU/WGSL/AST/TypeDecl.h	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebGPU/WGSL/AST/TypeDecl.h	2022-06-02 15:51:24 UTC (rev 295129)
@@ -94,29 +94,29 @@
 
     static std::optional<Base> stringViewToKind(StringView& view)
     {
-        if (view == "vec2")
+        if (view == "vec2"_s)
             return Base::Vec2;
-        if (view == "vec3")
+        if (view == "vec3"_s)
             return Base::Vec3;
-        if (view == "vec4")
+        if (view == "vec4"_s)
             return Base::Vec4;
-        if (view == "mat2x2")
+        if (view == "mat2x2"_s)
             return Base::Mat2x2;
-        if (view == "mat2x3")
+        if (view == "mat2x3"_s)
             return Base::Mat2x3;
-        if (view == "mat2x4")
+        if (view == "mat2x4"_s)
             return Base::Mat2x4;
-        if (view == "mat3x2")
+        if (view == "mat3x2"_s)
             return Base::Mat3x2;
-        if (view == "mat3x3")
+        if (view == "mat3x3"_s)
             return Base::Mat3x3;
-        if (view == "mat3x4")
+        if (view == "mat3x4"_s)
             return Base::Mat3x4;
-        if (view == "mat4x2")
+        if (view == "mat4x2"_s)
             return Base::Mat4x2;
-        if (view == "mat4x3")
+        if (view == "mat4x3"_s)
             return Base::Mat4x3;
-        if (view == "mat4x4")
+        if (view == "mat4x4"_s)
             return Base::Mat4x4;
         return std::nullopt;
     }

Modified: trunk/Source/WebGPU/WGSL/Lexer.cpp (295128 => 295129)


--- trunk/Source/WebGPU/WGSL/Lexer.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebGPU/WGSL/Lexer.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -195,47 +195,47 @@
             // FIXME: a trie would be more efficient here, look at _javascript_Core/KeywordLookupGenerator.py for an example of code autogeneration that produces such a trie.
             StringView view { startOfToken, currentTokenLength() };
             // FIXME: I don't think that true/false/f32/u32/i32/bool need to be their own tokens, they could just be regular identifiers.
-            if (view == "true")
+            if (view == "true"_s)
                 return makeToken(TokenType::LiteralTrue);
-            if (view == "false")
+            if (view == "false"_s)
                 return makeToken(TokenType::LiteralFalse);
-            if (view == "bool")
+            if (view == "bool"_s)
                 return makeToken(TokenType::KeywordBool);
-            if (view == "i32")
+            if (view == "i32"_s)
                 return makeToken(TokenType::KeywordI32);
-            if (view == "u32")
+            if (view == "u32"_s)
                 return makeToken(TokenType::KeywordU32);
-            if (view == "f32")
+            if (view == "f32"_s)
                 return makeToken(TokenType::KeywordF32);
-            if (view == "fn")
+            if (view == "fn"_s)
                 return makeToken(TokenType::KeywordFn);
-            if (view == "function")
+            if (view == "function"_s)
                 return makeToken(TokenType::KeywordFunction);
-            if (view == "private")
+            if (view == "private"_s)
                 return makeToken(TokenType::KeywordPrivate);
-            if (view == "read")
+            if (view == "read"_s)
                 return makeToken(TokenType::KeywordRead);
-            if (view == "read_write")
+            if (view == "read_write"_s)
                 return makeToken(TokenType::KeywordReadWrite);
-            if (view == "return")
+            if (view == "return"_s)
                 return makeToken(TokenType::KeywordReturn);
-            if (view == "storage")
+            if (view == "storage"_s)
                 return makeToken(TokenType::KeywordStorage);
-            if (view == "struct")
+            if (view == "struct"_s)
                 return makeToken(TokenType::KeywordStruct);
-            if (view == "uniform")
+            if (view == "uniform"_s)
                 return makeToken(TokenType::KeywordUniform);
-            if (view == "var")
+            if (view == "var"_s)
                 return makeToken(TokenType::KeywordVar);
-            if (view == "workgroup")
+            if (view == "workgroup"_s)
                 return makeToken(TokenType::KeywordWorkgroup);
-            if (view == "write")
+            if (view == "write"_s)
                 return makeToken(TokenType::KeywordWrite);
-            if (view == "asm" || view == "bf16" || view == "const" || view == "do" || view == "enum"
-                || view == "f16" || view == "f64" || view == "handle" || view == "i8" || view == "i16"
-                || view == "i64" || view == "mat" || view == "premerge" || view == "regardless"
-                || view == "typedef" || view == "u8" || view == "u16" || view == "u64" || view == "unless"
-                || view == "using" || view == "vec" || view == "void" || view == "while")
+            if (view == "asm"_s || view == "bf16"_s || view == "const"_s || view == "do"_s || view == "enum"_s
+                || view == "f16"_s || view == "f64"_s || view == "handle"_s || view == "i8"_s || view == "i16"_s
+                || view == "i64"_s || view == "mat"_s || view == "premerge"_s || view == "regardless"_s
+                || view == "typedef"_s || view == "u8"_s || view == "u16"_s || view == "u64"_s || view == "unless"_s
+                || view == "using"_s || view == "vec"_s || view == "void"_s || view == "while"_s)
                 return makeToken(TokenType::ReservedWord);
             return makeIdentifierToken(view);
         }

Modified: trunk/Source/WebGPU/WGSL/Parser.cpp (295128 => 295129)


--- trunk/Source/WebGPU/WGSL/Parser.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebGPU/WGSL/Parser.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -258,7 +258,7 @@
 
     CONSUME_TYPE(Attribute);
     CONSUME_TYPE_NAMED(ident, Identifier);
-    if (ident.m_ident == "group") {
+    if (ident.m_ident == "group"_s) {
         CONSUME_TYPE(ParenLeft);
         // FIXME: should more kinds of literals be accepted here?
         CONSUME_TYPE_NAMED(id, IntegerLiteral);
@@ -265,7 +265,7 @@
         CONSUME_TYPE(ParenRight);
         RETURN_NODE_REF(GroupAttribute, id.m_literalValue);
     }
-    if (ident.m_ident == "binding") {
+    if (ident.m_ident == "binding"_s) {
         CONSUME_TYPE(ParenLeft);
         // FIXME: should more kinds of literals be accepted here?
         CONSUME_TYPE_NAMED(id, IntegerLiteral);
@@ -272,19 +272,19 @@
         CONSUME_TYPE(ParenRight);
         RETURN_NODE_REF(BindingAttribute, id.m_literalValue);
     }
-    if (ident.m_ident == "stage") {
+    if (ident.m_ident == "stage"_s) {
         CONSUME_TYPE(ParenLeft);
         CONSUME_TYPE_NAMED(stage, Identifier);
         CONSUME_TYPE(ParenRight);
-        if (stage.m_ident == "compute")
+        if (stage.m_ident == "compute"_s)
             RETURN_NODE_REF(StageAttribute, AST::StageAttribute::Stage::Compute);
-        if (stage.m_ident == "vertex")
+        if (stage.m_ident == "vertex"_s)
             RETURN_NODE_REF(StageAttribute, AST::StageAttribute::Stage::Vertex);
-        if (stage.m_ident == "fragment")
+        if (stage.m_ident == "fragment"_s)
             RETURN_NODE_REF(StageAttribute, AST::StageAttribute::Stage::Fragment);
         FAIL("Invalid stage attribute, the only options are 'compute', 'vertex', 'fragment'."_s);
     }
-    if (ident.m_ident == "location") {
+    if (ident.m_ident == "location"_s) {
         CONSUME_TYPE(ParenLeft);
         // FIXME: should more kinds of literals be accepted here?
         CONSUME_TYPE_NAMED(id, IntegerLiteral);
@@ -291,7 +291,7 @@
         CONSUME_TYPE(ParenRight);
         RETURN_NODE_REF(LocationAttribute, id.m_literalValue);
     }
-    if (ident.m_ident == "builtin") {
+    if (ident.m_ident == "builtin"_s) {
         CONSUME_TYPE(ParenLeft);
         CONSUME_TYPE_NAMED(name, Identifier);
         CONSUME_TYPE(ParenRight);
@@ -665,10 +665,10 @@
     }
     case TokenType::Identifier: {
         CONSUME_TYPE_NAMED(ident, Identifier);
-        if (ident.m_ident == "true") {
+        if (ident.m_ident == "true"_s) {
             RETURN_NODE_REF(BoolLiteral, true);
         }
-        if (ident.m_ident == "false") {
+        if (ident.m_ident == "false"_s) {
             RETURN_NODE_REF(BoolLiteral, false);
         }
         if (current().m_type == TokenType::LT || current().m_type == TokenType::ParenLeft) {

Modified: trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm (295128 => 295129)


--- trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebKit/NetworkProcess/PrivateClickMeasurement/cocoa/PrivateClickMeasurementNetworkLoaderCocoa.mm	2022-06-02 15:51:24 UTC (rev 295129)
@@ -109,7 +109,7 @@
 {
     // Prevent contacting non-local servers when a test certificate chain is used for 127.0.0.1.
     // FIXME: Use a proxy server to have tests cover the reports sent to the destination, too.
-    if (allowedLocalTestServerTrust() && url.host() != "127.0.0.1")
+    if (allowedLocalTestServerTrust() && url.host() != "127.0.0.1"_s)
         return callback({ }, { });
 
     auto request = adoptNS([[NSMutableURLRequest alloc] initWithURL:url]);

Modified: trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp (295128 => 295129)


--- trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCache.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -88,7 +88,7 @@
     }
 
     varyValue.split(',', [&](StringView view) {
-        if (!recordInformation.hasVaryStar && stripLeadingAndTrailingHTTPSpaces(view) == "*")
+        if (!recordInformation.hasVaryStar && stripLeadingAndTrailingHTTPSpaces(view) == "*"_s)
             recordInformation.hasVaryStar = true;
         recordInformation.varyHeaders.add(view.toString(), request.httpHeaderField(view));
     });

Modified: trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp (295128 => 295129)


--- trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -95,7 +95,7 @@
 void WebKitProtocolHandler::handleRequest(WebKitURISchemeRequest* request)
 {
     URL requestURL = URL(String::fromLatin1(webkit_uri_scheme_request_get_uri(request)));
-    if (requestURL.host() == "gpu") {
+    if (requestURL.host() == "gpu"_s) {
         handleGPU(request);
         return;
     }

Modified: trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (295128 => 295129)


--- trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -1371,7 +1371,7 @@
 
 void WebsiteDataStore::setResourceLoadStatisticsFirstPartyHostCNAMEDomainForTesting(const URL& firstPartyURL, const URL& cnameURL, CompletionHandler<void()>&& completionHandler)
 {
-    if (cnameURL.host() != "testwebkit.org" && cnameURL.host() != "3rdpartytestwebkit.org") {
+    if (cnameURL.host() != "testwebkit.org"_s && cnameURL.host() != "3rdpartytestwebkit.org"_s) {
         completionHandler();
         return;
     }
@@ -1383,7 +1383,7 @@
 
 void WebsiteDataStore::setResourceLoadStatisticsThirdPartyCNAMEDomainForTesting(const URL& cnameURL, CompletionHandler<void()>&& completionHandler)
 {
-    if (cnameURL.host() != "testwebkit.org" && cnameURL.host() != "3rdpartytestwebkit.org") {
+    if (cnameURL.host() != "testwebkit.org"_s && cnameURL.host() != "3rdpartytestwebkit.org"_s) {
         completionHandler();
         return;
     }

Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (295128 => 295129)


--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2022-06-02 15:51:24 UTC (rev 295129)
@@ -2334,11 +2334,11 @@
     
 bool PDFPlugin::handleEditingCommand(StringView commandName)
 {
-    if (commandName == "copy")
+    if (commandName == "copy"_s)
         [m_pdfLayerController copySelection];
-    else if (commandName == "selectAll")
+    else if (commandName == "selectAll"_s)
         [m_pdfLayerController selectAll];
-    else if (commandName == "takeFindStringFromSelection") {
+    else if (commandName == "takeFindStringFromSelection"_s) {
         NSString *string = [m_pdfLayerController currentSelection].string;
         ALLOW_DEPRECATED_DECLARATIONS_BEGIN
         if (string.length)
@@ -2351,10 +2351,10 @@
 
 bool PDFPlugin::isEditingCommandEnabled(StringView commandName)
 {
-    if (commandName == "copy" || commandName == "takeFindStringFromSelection")
+    if (commandName == "copy"_s || commandName == "takeFindStringFromSelection"_s)
         return [m_pdfLayerController currentSelection];
 
-    if (commandName == "selectAll")
+    if (commandName == "selectAll"_s)
         return true;
 
     return false;

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp (295128 => 295129)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -319,18 +319,18 @@
 {
     String referenceHolder;
     StringView a = stringViewFromUTF8(referenceHolder, "Hello World!");
-    EXPECT_TRUE(a == "Hello World!");
-    EXPECT_FALSE(a == "Hello World");
-    EXPECT_FALSE(a == "Hello World!!");
+    EXPECT_TRUE(a == "Hello World!"_s);
+    EXPECT_FALSE(a == "Hello World"_s);
+    EXPECT_FALSE(a == "Hello World!!"_s);
 
     auto test = "Hell\0";
     a = StringView { (const LChar*)test, 5 };
-    EXPECT_FALSE(a == "Hell\0");
-    EXPECT_FALSE(a == "Hell");
+    EXPECT_FALSE(a == "Hell\0"_s);
+    EXPECT_FALSE(a == "Hell"_s);
 
     StringView test3 = "Hello"_s;
-    EXPECT_TRUE(test3 == "Hello\0");
-    EXPECT_TRUE(test3 == "Hello");
+    EXPECT_TRUE(test3 == "Hello\0"_s);
+    EXPECT_TRUE(test3 == "Hello"_s);
 }
 
 TEST(WTF, StringViewEqualIgnoringASCIICaseBasic)

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/URL.cpp (295128 => 295129)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/URL.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/URL.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -59,7 +59,7 @@
     EXPECT_FALSE(kurl.isNull());
     EXPECT_TRUE(kurl.isValid());
 
-    EXPECT_EQ(kurl.protocol() == "http", true);
+    EXPECT_TRUE(kurl.protocol() == "http"_s);
     EXPECT_EQ(String("www.example.com"_s), kurl.host().toString());
     EXPECT_TRUE(!!kurl.port());
     EXPECT_EQ(8080, kurl.port().value());

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm (295128 => 295129)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm	2022-06-02 15:51:24 UTC (rev 295129)
@@ -124,7 +124,7 @@
     [defaultFileManager createDirectoryAtURL:directUnusedDatabaseDirectoryURL withIntermediateDirectories:YES attributes:nil error:nil];
     [defaultFileManager copyItemAtURL:resourceDatabaseFileURL toURL:[directExistingDatabaseDirectoryURL URLByAppendingPathComponent:@"IndexedDB.sqlite3"] error:nil];
     [defaultFileManager copyItemAtURL:resourceDatabaseFileURL toURL:[directUnusedDatabaseDirectoryURL URLByAppendingPathComponent:@"IndexedDB.sqlite3"] error:nil];
-    if (testName == "none")
+    if (testName == "none"_s)
         return;
     
     NSString *existingDatbaseHash = WebCore::SQLiteFileSystem::computeHashForFileName(String { existingDatabaseName });
@@ -138,15 +138,15 @@
     NSURL *newVersionOtherOriginDatabaseDirectoryURL = [[newVersionDirectoryURL URLByAppendingPathComponent:@"https_webkit.org_0"] URLByAppendingPathComponent:existingDatbaseHash];
     [defaultFileManager createSymbolicLinkAtURL:oldVersionDirectoryURL withDestinationURL:idbRootURL error:nil];
 
-    if (testName == "v0")
+    if (testName == "v0"_s)
         return;
-    if (testName == "v1") {
+    if (testName == "v1"_s) {
         [defaultFileManager removeItemAtURL:directExistingDatabaseDirectoryURL error:nil];
         [defaultFileManager createDirectoryAtURL:newVersionExistingDatabaseDirectoryURL withIntermediateDirectories:YES attributes:nil error:nil];
         [defaultFileManager copyItemAtURL:resourceDatabaseFileURL toURL:[newVersionExistingDatabaseDirectoryURL URLByAppendingPathComponent:@"IndexedDB.sqlite3"] error:nil];
         return;
     }
-    if (testName == "API") {
+    if (testName == "API"_s) {
         [defaultFileManager createDirectoryAtURL:directOtherOriginDatabaseDirectoryURL withIntermediateDirectories:YES attributes:nil error:nil];
         [defaultFileManager createDirectoryAtURL:newVersionOtherOriginDatabaseDirectoryURL withIntermediateDirectories:YES attributes:nil error:nil];
         [defaultFileManager copyItemAtURL:resourceDatabaseFileURL toURL:[directOtherOriginDatabaseDirectoryURL URLByAppendingPathComponent:@"IndexedDB.sqlite3"] error:nil];

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp (295128 => 295129)


--- trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp	2022-06-02 15:36:49 UTC (rev 295128)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp	2022-06-02 15:51:24 UTC (rev 295129)
@@ -478,7 +478,7 @@
         [](WebKitURISchemeRequest* request, gpointer) {
             URL url = ""
             GRefPtr<GInputStream> inputStream = adoptGRef(g_memory_input_stream_new());
-            char* html = g_strdup_printf("<html><head><title>%s</title></head><body></body></html>", url.host() == "host5" ? "Title5" : "Title6");
+            char* html = g_strdup_printf("<html><head><title>%s</title></head><body></body></html>", url.host() == "host5"_s ? "Title5" : "Title6");
             g_memory_input_stream_add_data(G_MEMORY_INPUT_STREAM(inputStream.get()), html, strlen(html), g_free);
             webkit_uri_scheme_request_finish(request, inputStream.get(), strlen(html), "text/html");
         }, nullptr, nullptr);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to