Title: [293561] trunk
Revision
293561
Author
cdu...@apple.com
Date
2022-04-27 21:03:12 -0700 (Wed, 27 Apr 2022)

Log Message

Have equalIgnoringASCIICase() take in an ASCIILiteral instead of a const char*
https://bugs.webkit.org/show_bug.cgi?id=239802

Reviewed by Darin Adler.

Have equalIgnoringASCIICase() take in an ASCIILiteral instead of a const char*,
as we are encouraging developers to use ""_s for string literals.

* Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST):
* Tools/TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST):
* Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm:
(parameterValue):
(WebFrameLoaderClient::createPlugin):
* Source/WTF/wtf/text/AtomString.h:
(WTF::equalIgnoringASCIICase):
* Source/WTF/wtf/text/StringImpl.h:
(WTF::equalIgnoringASCIICase):
* Source/WTF/wtf/text/StringView.h:
(WTF::equalIgnoringASCIICase):
* Source/WTF/wtf/text/WTFString.h:
(WTF::equalIgnoringASCIICase):
* Source/WTF/wtf/unix/LanguageUnix.cpp:
(WTF::platformLanguage):
* Source/WebCore/Modules/applepay/PaymentCoordinator.cpp:
(WebCore::PaymentCoordinator::validatedPaymentNetwork const):
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::siblingWithAriaRole):
(WebCore::AccessibilityNodeObject::menuElementForMenuButton const):
(WebCore::AccessibilityNodeObject::menuItemElementForMenu const):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::popupValue const):
* Source/WebCore/css/MediaQueryEvaluator.cpp:
(WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific const):
* Source/WebCore/css/MediaQueryEvaluator.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::messageSourceForWTFLogChannel):
* Source/WebCore/dom/SecurityContext.cpp:
(WebCore::SecurityContext::isSupportedSandboxPolicy):
* Source/WebCore/html/HiddenInputType.cpp:
(WebCore::HiddenInputType::appendFormData const):
* Source/WebCore/html/LinkRelAttribute.cpp:
(WebCore::LinkRelAttribute::isSupported):
* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getExtension):
* Source/WebCore/html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::getExtension):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::extensionIsEnabled):
* Source/WebCore/page/FrameTree.cpp:
(WebCore::isBlankTargetFrameName):
(WebCore::isParentTargetFrameName):
(WebCore::isSelfTargetFrameName):
(WebCore::isTopTargetFrameName):
* Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::keySystemIsSupported):
* Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp:
(WebCore::FontCache::similarFont):
(WebCore::FontCache::platformAlternateFamilyName):
* Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::platformInit):
* Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp:
(WebCore::isThunderRanked):
* Source/WebCore/platform/network/CacheValidation.cpp:
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::normalizeHTTPMethod):
(WebCore::isSafeMethod):
* Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp:
(WebCore::CurlMultipartHandle::extractBoundary):
* Source/WebCore/platform/playstation/MIMETypeRegistryPlayStation.cpp:
(WebCore::MIMETypeRegistry::mimeTypeForExtension):
(WebCore::MIMETypeRegistry::preferredExtensionForMIMEType):
* Source/WebCore/style/ElementRuleCollector.h:
(WebCore::Style::ElementRuleCollector::setMedium):
* Source/WebCore/svg/SVGToOTFFontConversion.cpp:
(WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable):
(WebCore::SVGToOTFFontConverter::appendGSUBTable):
* Source/WebCore/xml/XMLHttpRequest.cpp:
(WebCore::replaceCharsetInMediaTypeIfNeeded):

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

Modified Paths

Diff

Modified: trunk/Source/WTF/wtf/text/AtomString.h (293560 => 293561)


--- trunk/Source/WTF/wtf/text/AtomString.h	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WTF/wtf/text/AtomString.h	2022-04-28 04:03:12 UTC (rev 293561)
@@ -191,7 +191,8 @@
 bool equalIgnoringASCIICase(const AtomString&, const AtomString&);
 bool equalIgnoringASCIICase(const AtomString&, const String&);
 bool equalIgnoringASCIICase(const String&, const AtomString&);
-bool equalIgnoringASCIICase(const AtomString&, const char*);
+bool equalIgnoringASCIICase(const AtomString&, ASCIILiteral);
+bool equalIgnoringASCIICase(const AtomString&, const char*) = delete;
 
 bool equalLettersIgnoringASCIICase(const AtomString&, ASCIILiteral);
 
@@ -338,7 +339,7 @@
     return equalIgnoringASCIICase(a, b.string());
 }
 
-inline bool equalIgnoringASCIICase(const AtomString& a, const char* b)
+inline bool equalIgnoringASCIICase(const AtomString& a, ASCIILiteral b)
 {
     return equalIgnoringASCIICase(a.string(), b);
 }

Modified: trunk/Source/WTF/wtf/text/StringCommon.h (293560 => 293561)


--- trunk/Source/WTF/wtf/text/StringCommon.h	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WTF/wtf/text/StringCommon.h	2022-04-28 04:03:12 UTC (rev 293561)
@@ -550,6 +550,12 @@
     return length == strlen(b) && equalIgnoringASCIICase(a, b, length);
 }
 
+inline bool equalLettersIgnoringASCIICase(ASCIILiteral a, ASCIILiteral b)
+{
+    auto bLength = b.length();
+    return a.length() == bLength && equalLettersIgnoringASCIICase(a.characters(), b.characters(), bLength);
+}
+
 inline bool equalLettersIgnoringASCIICase(const char* string, ASCIILiteral literal)
 {
     auto literalLength = literal.length();
@@ -556,8 +562,19 @@
     return strlen(string) == literalLength && equalLettersIgnoringASCIICase(string, literal.characters(), literalLength);
 }
 
+inline bool equalIgnoringASCIICase(const char* string, ASCIILiteral literal)
+{
+    auto literalLength = literal.length();
+    return strlen(string) == literal.length() && equalIgnoringASCIICase(string, literal.characters(), literalLength);
 }
 
+inline bool equalIgnoringASCIICase(ASCIILiteral a, ASCIILiteral b)
+{
+    return equalIgnoringASCIICase(a.characters(), a.length(), b.characters(), b.length());
+}
+
+}
+
 using WTF::equalIgnoringASCIICase;
 using WTF::equalLettersIgnoringASCIICase;
 using WTF::isLatin1;

Modified: trunk/Source/WTF/wtf/text/StringImpl.h (293560 => 293561)


--- trunk/Source/WTF/wtf/text/StringImpl.h	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WTF/wtf/text/StringImpl.h	2022-04-28 04:03:12 UTC (rev 293561)
@@ -580,8 +580,10 @@
 
 bool equalIgnoringASCIICase(const StringImpl&, const StringImpl&);
 WTF_EXPORT_PRIVATE bool equalIgnoringASCIICase(const StringImpl*, const StringImpl*);
-bool equalIgnoringASCIICase(const StringImpl&, const char*);
-bool equalIgnoringASCIICase(const StringImpl*, const char*);
+bool equalIgnoringASCIICase(const StringImpl&, ASCIILiteral);
+bool equalIgnoringASCIICase(const StringImpl*, ASCIILiteral);
+bool equalIgnoringASCIICase(const StringImpl&, const char*) = delete;
+bool equalIgnoringASCIICase(const StringImpl*, const char*) = delete;
 
 WTF_EXPORT_PRIVATE bool equalIgnoringASCIICaseNonNull(const StringImpl*, const StringImpl*);
 
@@ -1259,12 +1261,12 @@
     return equalIgnoringASCIICaseCommon(a, b);
 }
 
-inline bool equalIgnoringASCIICase(const StringImpl& a, const char* b)
+inline bool equalIgnoringASCIICase(const StringImpl& a, ASCIILiteral b)
 {
-    return equalIgnoringASCIICaseCommon(a, b);
+    return equalIgnoringASCIICaseCommon(a, b.characters());
 }
 
-inline bool equalIgnoringASCIICase(const StringImpl* a, const char* b)
+inline bool equalIgnoringASCIICase(const StringImpl* a, ASCIILiteral b)
 {
     return a && equalIgnoringASCIICase(*a, b);
 }

Modified: trunk/Source/WTF/wtf/text/StringView.h (293560 => 293561)


--- trunk/Source/WTF/wtf/text/StringView.h	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WTF/wtf/text/StringView.h	2022-04-28 04:03:12 UTC (rev 293561)
@@ -222,7 +222,7 @@
 bool equal(StringView, const LChar* b);
 
 bool equalIgnoringASCIICase(StringView, StringView);
-bool equalIgnoringASCIICase(StringView, const char*);
+bool equalIgnoringASCIICase(StringView, const char*) = delete;
 bool equalIgnoringASCIICase(StringView, ASCIILiteral);
 
 WTF_EXPORT_PRIVATE bool equalRespectingNullity(StringView, StringView);
@@ -711,11 +711,6 @@
     return equalIgnoringASCIICaseCommon(a, b);
 }
 
-inline bool equalIgnoringASCIICase(StringView a, const char* b)
-{
-    return equalIgnoringASCIICaseCommon(a, b);
-}
-
 inline bool equalIgnoringASCIICase(StringView a, ASCIILiteral b)
 {
     return equalIgnoringASCIICaseCommon(a, b.characters());

Modified: trunk/Source/WTF/wtf/text/WTFString.h (293560 => 293561)


--- trunk/Source/WTF/wtf/text/WTFString.h	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WTF/wtf/text/WTFString.h	2022-04-28 04:03:12 UTC (rev 293561)
@@ -360,7 +360,7 @@
 
 bool equalIgnoringASCIICase(const String&, const String&);
 bool equalIgnoringASCIICase(const String&, ASCIILiteral);
-bool equalIgnoringASCIICase(const String&, const char*);
+bool equalIgnoringASCIICase(const String&, const char*) = delete;
 
 bool equalLettersIgnoringASCIICase(const String&, ASCIILiteral);
 bool startsWithLettersIgnoringASCIICase(const String&, ASCIILiteral);
@@ -582,16 +582,11 @@
     return equalIgnoringASCIICase(a.impl(), b.impl());
 }
 
-inline bool equalIgnoringASCIICase(const String& a, const char* b)
+inline bool equalIgnoringASCIICase(const String& a, ASCIILiteral b)
 {
     return equalIgnoringASCIICase(a.impl(), b);
 }
 
-inline bool equalIgnoringASCIICase(const String& a, ASCIILiteral b)
-{
-    return equalIgnoringASCIICase(a.impl(), b.characters());
-}
-
 inline bool startsWithLettersIgnoringASCIICase(const String& string, ASCIILiteral literal)
 {
     return startsWithLettersIgnoringASCIICase(string.impl(), literal);

Modified: trunk/Source/WTF/wtf/unix/LanguageUnix.cpp (293560 => 293561)


--- trunk/Source/WTF/wtf/unix/LanguageUnix.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WTF/wtf/unix/LanguageUnix.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -33,7 +33,7 @@
 static String platformLanguage()
 {
     auto localeDefault = String::fromLatin1(setlocale(LC_CTYPE, nullptr));
-    if (localeDefault.isEmpty() || equalIgnoringASCIICase(localeDefault, "C") || equalIgnoringASCIICase(localeDefault, "POSIX"))
+    if (localeDefault.isEmpty() || equalIgnoringASCIICase(localeDefault, "C"_s) || equalIgnoringASCIICase(localeDefault, "POSIX"_s))
         return "en-US"_s;
 
     auto normalizedDefault = makeStringByReplacingAll(localeDefault, '_', '-');

Modified: trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp (293560 => 293561)


--- trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -268,7 +268,7 @@
     if (version < 2 && equalLettersIgnoringASCIICase(paymentNetwork, "jcb"_s))
         return std::nullopt;
 
-    if (version < 3 && equalIgnoringASCIICase(paymentNetwork, "carteBancaire"))
+    if (version < 3 && equalIgnoringASCIICase(paymentNetwork, "carteBancaire"_s))
         return std::nullopt;
 
     return m_client.validatedPaymentNetwork(paymentNetwork);

Modified: trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp (293560 => 293561)


--- trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -1401,7 +1401,7 @@
     return String();
 }
 
-static Element* siblingWithAriaRole(Node* node, const char* role)
+static Element* siblingWithAriaRole(Node* node, ASCIILiteral role)
 {
     // FIXME: Either we should add a null check here or change the function to take a reference instead of a pointer.
     ContainerNode* parent = node->parentNode();
@@ -1422,7 +1422,7 @@
     if (ariaRoleAttribute() != AccessibilityRole::MenuButton)
         return nullptr;
 
-    return siblingWithAriaRole(node(), "menu");
+    return siblingWithAriaRole(node(), "menu"_s);
 }
 
 AccessibilityObject* AccessibilityNodeObject::menuForMenuButton() const
@@ -1437,7 +1437,7 @@
     if (ariaRoleAttribute() != AccessibilityRole::Menu)
         return nullptr;
     
-    return siblingWithAriaRole(node(), "menuitem");
+    return siblingWithAriaRole(node(), "menuitem"_s);
 }
 
 AccessibilityObject* AccessibilityNodeObject::menuButtonForMenu() const

Modified: trunk/Source/WebCore/accessibility/AccessibilityObject.cpp (293560 => 293561)


--- trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/accessibility/AccessibilityObject.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -3027,7 +3027,7 @@
 
     for (auto& value : { "menu"_s, "listbox"_s, "tree"_s, "grid"_s, "dialog"_s }) {
         // FIXME: Should fix ambiguity so we don't have to write "characters", but also don't create/destroy a String when passing an ASCIILiteral to equalIgnoringASCIICase.
-        if (equalIgnoringASCIICase(hasPopup, value.characters()))
+        if (equalIgnoringASCIICase(hasPopup, value))
             return value;
     }
 

Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (293560 => 293561)


--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -143,11 +143,11 @@
         || equalIgnoringASCIICase(mediaTypeToMatch, m_mediaType);
 }
 
-bool MediaQueryEvaluator::mediaTypeMatchSpecific(const char* mediaTypeToMatch) const
+bool MediaQueryEvaluator::mediaTypeMatchSpecific(ASCIILiteral mediaTypeToMatch) const
 {
     // Like mediaTypeMatch, but without the special cases for "" and "all".
-    ASSERT(mediaTypeToMatch);
-    ASSERT(mediaTypeToMatch[0] != '\0');
+    ASSERT(!mediaTypeToMatch.isNull());
+    ASSERT(mediaTypeToMatch.characterAt(0) != '\0');
     ASSERT(!equalLettersIgnoringASCIICase(mediaTypeToMatch, "all"_s));
     return equalIgnoringASCIICase(m_mediaType, mediaTypeToMatch);
 }

Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.h (293560 => 293561)


--- trunk/Source/WebCore/css/MediaQueryEvaluator.h	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.h	2022-04-28 04:03:12 UTC (rev 293561)
@@ -77,7 +77,7 @@
     WEBCORE_EXPORT MediaQueryEvaluator(const String& acceptedMediaType, const Document&, const RenderStyle*);
 
     bool mediaTypeMatch(const String& mediaTypeToMatch) const;
-    bool mediaTypeMatchSpecific(const char* mediaTypeToMatch) const;
+    bool mediaTypeMatchSpecific(ASCIILiteral mediaTypeToMatch) const;
 
     // Evaluates media query subexpression, ie "and (media-feature: value)" part.
     bool evaluate(const MediaQueryExpression&) const;

Modified: trunk/Source/WebCore/dom/Document.cpp (293560 => 293561)


--- trunk/Source/WebCore/dom/Document.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/dom/Document.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -8687,17 +8687,13 @@
 
 static MessageSource messageSourceForWTFLogChannel(const WTFLogChannel& channel)
 {
-    static const NeverDestroyed<String> mediaChannel = MAKE_STATIC_STRING_IMPL("media");
-    static const NeverDestroyed<String> webrtcChannel = MAKE_STATIC_STRING_IMPL("webrtc");
-    static const NeverDestroyed<String> mediaSourceChannel = MAKE_STATIC_STRING_IMPL("mediasource");
-
-    if (equalIgnoringASCIICase(mediaChannel, channel.name))
+    if (equalLettersIgnoringASCIICase(channel.name, "media"_s))
         return MessageSource::Media;
 
-    if (equalIgnoringASCIICase(webrtcChannel, channel.name))
+    if (equalLettersIgnoringASCIICase(channel.name, "webrtc"_s))
         return MessageSource::WebRTC;
 
-    if (equalIgnoringASCIICase(mediaSourceChannel, channel.name))
+    if (equalLettersIgnoringASCIICase(channel.name, "mediasource"_s))
         return MessageSource::MediaSource;
 
     return MessageSource::Other;

Modified: trunk/Source/WebCore/dom/SecurityContext.cpp (293560 => 293561)


--- trunk/Source/WebCore/dom/SecurityContext.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/dom/SecurityContext.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -83,11 +83,13 @@
 
 bool SecurityContext::isSupportedSandboxPolicy(StringView policy)
 {
-    static const char* const supportedPolicies[] = {
-        "allow-top-navigation-to-custom-protocols", "allow-forms", "allow-same-origin", "allow-scripts", "allow-top-navigation", "allow-pointer-lock", "allow-popups", "allow-popups-to-escape-sandbox", "allow-top-navigation-by-user-activation", "allow-modals", "allow-storage-access-by-user-activation"
+    static constexpr ASCIILiteral supportedPolicies[] = {
+        "allow-top-navigation-to-custom-protocols"_s, "allow-forms"_s, "allow-same-origin"_s, "allow-scripts"_s,
+        "allow-top-navigation"_s, "allow-pointer-lock"_s, "allow-popups"_s, "allow-popups-to-escape-sandbox"_s,
+        "allow-top-navigation-by-user-activation"_s, "allow-modals"_s, "allow-storage-access-by-user-activation"_s
     };
 
-    for (auto* supportedPolicy : supportedPolicies) {
+    for (auto supportedPolicy : supportedPolicies) {
         if (equalIgnoringASCIICase(policy, supportedPolicy))
             return true;
     }

Modified: trunk/Source/WebCore/html/HiddenInputType.cpp (293560 => 293561)


--- trunk/Source/WebCore/html/HiddenInputType.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/html/HiddenInputType.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -94,7 +94,7 @@
     ASSERT(element());
     auto name = element()->name();
 
-    if (equalIgnoringASCIICase(name, "_charset_")) {
+    if (equalIgnoringASCIICase(name, "_charset_"_s)) {
         formData.append(name, String::fromLatin1(formData.encoding().name()));
         return true;
     }

Modified: trunk/Source/WebCore/html/LinkRelAttribute.cpp (293560 => 293561)


--- trunk/Source/WebCore/html/LinkRelAttribute.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/html/LinkRelAttribute.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -103,14 +103,14 @@
 // https://html.spec.whatwg.org/#linkTypes
 bool LinkRelAttribute::isSupported(Document& document, StringView attribute)
 {
-    static const char* const supportedAttributes[] = {
-        "alternate", "dns-prefetch", "icon", "stylesheet", "apple-touch-icon", "apple-touch-icon-precomposed",
+    static constexpr ASCIILiteral supportedAttributes[] = {
+        "alternate"_s, "dns-prefetch"_s, "icon"_s, "stylesheet"_s, "apple-touch-icon"_s, "apple-touch-icon-precomposed"_s,
 #if ENABLE(APPLICATION_MANIFEST)
-        "manifest",
+        "manifest"_s,
 #endif
     };
 
-    for (auto* supportedAttribute : supportedAttributes) {
+    for (auto supportedAttribute : supportedAttributes) {
         if (equalIgnoringASCIICase(attribute, supportedAttribute))
             return true;
     }

Modified: trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp (293560 => 293561)


--- trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -2710,25 +2710,25 @@
         return variable.get(); \
     }
 
-    ENABLE_IF_REQUESTED(EXTTextureCompressionRGTC, m_extTextureCompressionRGTC, "EXT_texture_compression_rgtc", enableSupportedExtension("GL_EXT_texture_compression_rgtc"_s));
-    ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "EXT_texture_filter_anisotropic", enableSupportedExtension("GL_EXT_texture_filter_anisotropic"_s));
-    ENABLE_IF_REQUESTED(OESTextureFloatLinear, m_oesTextureFloatLinear, "OES_texture_float_linear", enableSupportedExtension("GL_OES_texture_float_linear"_s));
-    ENABLE_IF_REQUESTED(WebGLLoseContext, m_webglLoseContext, "WEBGL_lose_context", true);
-    ENABLE_IF_REQUESTED(WebGLCompressedTextureASTC, m_webglCompressedTextureASTC, "WEBGL_compressed_texture_astc", WebGLCompressedTextureASTC::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLCompressedTextureATC, m_webglCompressedTextureATC, "WEBKIT_WEBGL_compressed_texture_atc", WebGLCompressedTextureATC::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLCompressedTextureETC, m_webglCompressedTextureETC, "WEBGL_compressed_texture_etc", WebGLCompressedTextureETC::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLCompressedTextureETC1, m_webglCompressedTextureETC1, "WEBGL_compressed_texture_etc1", WebGLCompressedTextureETC1::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBGL_compressed_texture_pvrtc", WebGLCompressedTexturePVRTC::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TC, m_webglCompressedTextureS3TC, "WEBGL_compressed_texture_s3tc", WebGLCompressedTextureS3TC::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TCsRGB, m_webglCompressedTextureS3TCsRGB, "WEBGL_compressed_texture_s3tc_srgb", WebGLCompressedTextureS3TCsRGB::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLDebugRendererInfo, m_webglDebugRendererInfo, "WEBGL_debug_renderer_info", true);
-    ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders", m_context->supportsExtension("GL_ANGLE_translated_shader_source"_s));
-    ENABLE_IF_REQUESTED(EXTColorBufferFloat, m_extColorBufferFloat, "EXT_color_buffer_float", EXTColorBufferFloat::supported(*m_context));
-    ENABLE_IF_REQUESTED(EXTColorBufferHalfFloat, m_extColorBufferHalfFloat, "EXT_color_buffer_half_float", EXTColorBufferHalfFloat::supported(*m_context));
-    ENABLE_IF_REQUESTED(EXTFloatBlend, m_extFloatBlend, "EXT_float_blend", EXTFloatBlend::supported(*m_context));
-    ENABLE_IF_REQUESTED(KHRParallelShaderCompile, m_khrParallelShaderCompile, "KHR_parallel_shader_compile", KHRParallelShaderCompile::supported(*m_context));
-    ENABLE_IF_REQUESTED(WebGLMultiDraw, m_webglMultiDraw, "WEBGL_multi_draw", true);
+    ENABLE_IF_REQUESTED(EXTTextureCompressionRGTC, m_extTextureCompressionRGTC, "EXT_texture_compression_rgtc"_s, enableSupportedExtension("GL_EXT_texture_compression_rgtc"_s));
+    ENABLE_IF_REQUESTED(EXTTextureFilterAnisotropic, m_extTextureFilterAnisotropic, "EXT_texture_filter_anisotropic"_s, enableSupportedExtension("GL_EXT_texture_filter_anisotropic"_s));
+    ENABLE_IF_REQUESTED(OESTextureFloatLinear, m_oesTextureFloatLinear, "OES_texture_float_linear"_s, enableSupportedExtension("GL_OES_texture_float_linear"_s));
+    ENABLE_IF_REQUESTED(WebGLLoseContext, m_webglLoseContext, "WEBGL_lose_context"_s, true);
+    ENABLE_IF_REQUESTED(WebGLCompressedTextureASTC, m_webglCompressedTextureASTC, "WEBGL_compressed_texture_astc"_s, WebGLCompressedTextureASTC::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLCompressedTextureATC, m_webglCompressedTextureATC, "WEBKIT_WEBGL_compressed_texture_atc"_s, WebGLCompressedTextureATC::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLCompressedTextureETC, m_webglCompressedTextureETC, "WEBGL_compressed_texture_etc"_s, WebGLCompressedTextureETC::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLCompressedTextureETC1, m_webglCompressedTextureETC1, "WEBGL_compressed_texture_etc1"_s, WebGLCompressedTextureETC1::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBKIT_WEBGL_compressed_texture_pvrtc"_s, WebGLCompressedTexturePVRTC::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLCompressedTexturePVRTC, m_webglCompressedTexturePVRTC, "WEBGL_compressed_texture_pvrtc"_s, WebGLCompressedTexturePVRTC::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TC, m_webglCompressedTextureS3TC, "WEBGL_compressed_texture_s3tc"_s, WebGLCompressedTextureS3TC::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TCsRGB, m_webglCompressedTextureS3TCsRGB, "WEBGL_compressed_texture_s3tc_srgb"_s, WebGLCompressedTextureS3TCsRGB::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLDebugRendererInfo, m_webglDebugRendererInfo, "WEBGL_debug_renderer_info"_s, true);
+    ENABLE_IF_REQUESTED(WebGLDebugShaders, m_webglDebugShaders, "WEBGL_debug_shaders"_s, m_context->supportsExtension("GL_ANGLE_translated_shader_source"_s));
+    ENABLE_IF_REQUESTED(EXTColorBufferFloat, m_extColorBufferFloat, "EXT_color_buffer_float"_s, EXTColorBufferFloat::supported(*m_context));
+    ENABLE_IF_REQUESTED(EXTColorBufferHalfFloat, m_extColorBufferHalfFloat, "EXT_color_buffer_half_float"_s, EXTColorBufferHalfFloat::supported(*m_context));
+    ENABLE_IF_REQUESTED(EXTFloatBlend, m_extFloatBlend, "EXT_float_blend"_s, EXTFloatBlend::supported(*m_context));
+    ENABLE_IF_REQUESTED(KHRParallelShaderCompile, m_khrParallelShaderCompile, "KHR_parallel_shader_compile"_s, KHRParallelShaderCompile::supported(*m_context));
+    ENABLE_IF_REQUESTED(WebGLMultiDraw, m_webglMultiDraw, "WEBGL_multi_draw"_s, true);
     return nullptr;
 }
 

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp (293560 => 293561)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContext.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -138,7 +138,7 @@
         return nullptr;
 
 #define ENABLE_IF_REQUESTED(type, variable, nameLiteral, canEnable) \
-    if (equalIgnoringASCIICase(name, nameLiteral)) { \
+    if (equalIgnoringASCIICase(name, nameLiteral ## _s)) { \
         if (!variable) { \
             variable = (canEnable) ? adoptRef(new type(*this)) : nullptr; \
             if (variable != nullptr) \
@@ -150,7 +150,7 @@
     ENABLE_IF_REQUESTED(EXTBlendMinMax, m_extBlendMinMax, "EXT_blend_minmax", enableSupportedExtension("GL_EXT_blend_minmax"_s));
     ENABLE_IF_REQUESTED(EXTsRGB, m_extsRGB, "EXT_sRGB", enableSupportedExtension("GL_EXT_sRGB"_s));
     ENABLE_IF_REQUESTED(EXTFragDepth, m_extFragDepth, "EXT_frag_depth", enableSupportedExtension("GL_EXT_frag_depth"_s));
-    if (equalIgnoringASCIICase(name, "EXT_shader_texture_lod")) {
+    if (equalIgnoringASCIICase(name, "EXT_shader_texture_lod"_s)) {
         if (!m_extShaderTextureLOD) {
             if (!(m_context->supportsExtension("GL_EXT_shader_texture_lod"_s) || m_context->supportsExtension("GL_ARB_shader_texture_lod"_s)))
                 m_extShaderTextureLOD = nullptr;
@@ -183,7 +183,7 @@
     ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TC, m_webglCompressedTextureS3TC, "WEBGL_compressed_texture_s3tc", WebGLCompressedTextureS3TC::supported(*m_context));
     ENABLE_IF_REQUESTED(WebGLCompressedTextureS3TCsRGB, m_webglCompressedTextureS3TCsRGB, "WEBGL_compressed_texture_s3tc_srgb", WebGLCompressedTextureS3TCsRGB::supported(*m_context));
     ENABLE_IF_REQUESTED(WebGLDepthTexture, m_webglDepthTexture, "WEBGL_depth_texture", WebGLDepthTexture::supported(*m_context));
-    if (equalIgnoringASCIICase(name, "WEBGL_draw_buffers")) {
+    if (equalIgnoringASCIICase(name, "WEBGL_draw_buffers"_s)) {
         if (!m_webglDrawBuffers) {
             if (!supportsDrawBuffers())
                 m_webglDrawBuffers = nullptr;
@@ -195,7 +195,7 @@
         }
         return m_webglDrawBuffers.get();
     }
-    if (equalIgnoringASCIICase(name, "ANGLE_instanced_arrays")) {
+    if (equalIgnoringASCIICase(name, "ANGLE_instanced_arrays"_s)) {
         if (!m_angleInstancedArrays) {
             if (!ANGLEInstancedArrays::supported(*m_context))
                 m_angleInstancedArrays = nullptr;

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (293560 => 293561)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -3993,7 +3993,7 @@
 bool WebGLRenderingContextBase::extensionIsEnabled(const String& name)
 {
 #define CHECK_EXTENSION(variable, nameLiteral) \
-    if (equalIgnoringASCIICase(name, nameLiteral)) \
+    if (equalIgnoringASCIICase(name, nameLiteral ## _s)) \
         return variable != nullptr;
 
     CHECK_EXTENSION(m_extFragDepth, "EXT_frag_depth");

Modified: trunk/Source/WebCore/page/FrameTree.cpp (293560 => 293561)


--- trunk/Source/WebCore/page/FrameTree.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/page/FrameTree.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -472,23 +472,23 @@
 
 bool isBlankTargetFrameName(StringView name)
 {
-    return equalIgnoringASCIICase(name, "_blank");
+    return equalIgnoringASCIICase(name, "_blank"_s);
 }
 
 bool isParentTargetFrameName(StringView name)
 {
-    return equalIgnoringASCIICase(name, "_parent");
+    return equalIgnoringASCIICase(name, "_parent"_s);
 }
 
 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") || name == "_current";
+    return name.isEmpty() || equalIgnoringASCIICase(name, "_self"_s) || name == "_current";
 }
 
 bool isTopTargetFrameName(StringView name)
 {
-    return equalIgnoringASCIICase(name, "_top");
+    return equalIgnoringASCIICase(name, "_top"_s);
 }
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (293560 => 293561)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2022-04-28 04:03:12 UTC (rev 293561)
@@ -2019,7 +2019,7 @@
 static bool keySystemIsSupported(const String& keySystem)
 {
     return equalLettersIgnoringASCIICase(keySystem, "com.apple.fps"_s)
-        || equalIgnoringASCIICase(keySystem, "com.apple.fps.1_0")
+        || equalIgnoringASCIICase(keySystem, "com.apple.fps.1_0"_s)
         || equalLettersIgnoringASCIICase(keySystem, "org.w3c.clearkey"_s);
 }
 #endif

Modified: trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp (293560 => 293561)


--- trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/graphics/cocoa/FontCacheCoreText.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -731,7 +731,7 @@
     static constexpr ASCIILiteral matchWords[] = { "Arabic"_s, "Pashto"_s, "Urdu"_s };
     auto familyMatcher = StringView(family);
     for (auto matchWord : matchWords) {
-        if (equalIgnoringASCIICase(familyMatcher, StringView(matchWord)))
+        if (equalIgnoringASCIICase(familyMatcher, matchWord))
             return fontForFamily(description, isFontWeightBold(description.weight()) ? "GeezaPro-Bold"_s : "GeezaPro"_s);
     }
     return nullptr;
@@ -1533,7 +1533,7 @@
     case 10:
         if (equalLettersIgnoringASCIICase(familyName, "ms mingliu"_s))
             return songtiTC;
-        if (equalIgnoringASCIICase(familyName, "\\5b8b\\4f53"))
+        if (equalIgnoringASCIICase(familyName, "\\5b8b\\4f53"_s))
             return songtiSC;
         break;
     case 18:

Modified: trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp (293560 => 293561)


--- trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -175,7 +175,7 @@
     if (FcPatternGetString(m_platformData.fcPattern(), FC_FAMILY, 0, &fontConfigFamilyName) == FcResultMatch) {
         String familyName = String::fromUTF8(reinterpret_cast<char*>(fontConfigFamilyName));
         // Disable antialiasing for the Ahem font because many tests require this.
-        if (equalIgnoringASCIICase(familyName, "Ahem"))
+        if (equalIgnoringASCIICase(familyName, "Ahem"_s))
             m_allowsAntialiasing = false;
     }
 }

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp (293560 => 293561)


--- trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -316,7 +316,7 @@
 bool isThunderRanked()
 {
     const char* value = g_getenv("WEBKIT_GST_EME_RANK_PRIORITY");
-    return value && equalIgnoringASCIICase(value, "Thunder");
+    return value && equalIgnoringASCIICase(value, "Thunder"_s);
 }
 #endif
 

Modified: trunk/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h (293560 => 293561)


--- trunk/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/eme/GStreamerEMEUtilities.h	2022-04-28 04:03:12 UTC (rev 293561)
@@ -125,10 +125,10 @@
 
 public:
     static constexpr char const* s_ClearKeyUUID = WEBCORE_GSTREAMER_EME_UTILITIES_CLEARKEY_UUID;
-    static constexpr char const* s_ClearKeyKeySystem = "org.w3.clearkey";
+    static constexpr auto s_ClearKeyKeySystem = "org.w3.clearkey"_s;
 #if ENABLE(THUNDER)
     static constexpr char const* s_WidevineUUID = WEBCORE_GSTREAMER_EME_UTILITIES_WIDEVINE_UUID;
-    static constexpr char const* s_WidevineKeySystem = "com.widevine.alpha";
+    static constexpr auto s_WidevineKeySystem = "com.widevine.alpha"_s;
 #endif
 
     static bool isClearKeyKeySystem(const String& keySystem)

Modified: trunk/Source/WebCore/platform/network/CacheValidation.cpp (293560 => 293561)


--- trunk/Source/WebCore/platform/network/CacheValidation.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/network/CacheValidation.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -41,29 +41,29 @@
 // These response headers are not copied from a revalidated response to the
 // cached response headers. For compatibility, this list is based on Chromium's
 // net/http/http_response_headers.cc.
-static const char* const headersToIgnoreAfterRevalidation[] = {
-    "allow",
-    "connection",
-    "etag",
-    "keep-alive",
-    "last-modified",
-    "proxy-authenticate",
-    "proxy-connection",
-    "trailer",
-    "transfer-encoding",
-    "upgrade",
-    "www-authenticate",
-    "x-frame-options",
-    "x-xss-protection",
+static constexpr ASCIILiteral headersToIgnoreAfterRevalidation[] = {
+    "allow"_s,
+    "connection"_s,
+    "etag"_s,
+    "keep-alive"_s,
+    "last-modified"_s,
+    "proxy-authenticate"_s,
+    "proxy-connection"_s,
+    "trailer"_s,
+    "transfer-encoding"_s,
+    "upgrade"_s,
+    "www-authenticate"_s,
+    "x-frame-options"_s,
+    "x-xss-protection"_s,
 };
 
 // Some header prefixes mean "Don't copy this header from a 304 response.".
 // Rather than listing all the relevant headers, we can consolidate them into
 // this list, also grabbed from Chromium's net/http/http_response_headers.cc.
-static const char* const headerPrefixesToIgnoreAfterRevalidation[] = {
-    "content-",
-    "x-content-",
-    "x-webkit-"
+static constexpr ASCIILiteral headerPrefixesToIgnoreAfterRevalidation[] = {
+    "content-"_s,
+    "x-content-"_s,
+    "x-webkit-"_s
 };
 
 static inline bool shouldUpdateHeaderAfterRevalidation(const String& header)

Modified: trunk/Source/WebCore/platform/network/HTTPParsers.cpp (293560 => 293561)


--- trunk/Source/WebCore/platform/network/HTTPParsers.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/network/HTTPParsers.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -1033,7 +1033,7 @@
 {
     const ASCIILiteral methods[] = { "DELETE"_s, "GET"_s, "HEAD"_s, "OPTIONS"_s, "POST"_s, "PUT"_s };
     for (auto value : methods) {
-        if (equalIgnoringASCIICase(method, value.characters())) {
+        if (equalIgnoringASCIICase(method, value)) {
             // Don't bother allocating a new string if it's already all uppercase.
             if (method == value)
                 break;
@@ -1048,7 +1048,7 @@
 {
     const ASCIILiteral safeMethods[] = { "GET"_s, "HEAD"_s, "OPTIONS"_s, "TRACE"_s };
     for (auto value : safeMethods) {
-        if (equalIgnoringASCIICase(method, value.characters()))
+        if (equalIgnoringASCIICase(method, value))
             return true;
     }
     return false;

Modified: trunk/Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp (293560 => 293561)


--- trunk/Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -57,7 +57,7 @@
             continue;
 
         auto key = header.left(splitPosition).stripWhiteSpace();
-        if (!equalIgnoringASCIICase(key, "Content-Type"))
+        if (!equalIgnoringASCIICase(key, "Content-Type"_s))
             continue;
 
         auto contentType = header.substring(splitPosition + 1).stripWhiteSpace();

Modified: trunk/Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp (293560 => 293561)


--- trunk/Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/network/curl/ResourceResponseCurl.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -36,33 +36,33 @@
 
 bool ResourceResponse::isAppendableHeader(const String &key)
 {
-    static const char* appendableHeaders[] = {
-        "access-control-allow-headers",
-        "access-control-allow-methods",
-        "access-control-allow-origin",
-        "access-control-expose-headers",
-        "allow",
-        "cache-control",
-        "connection",
-        "content-encoding",
-        "content-language",
-        "if-match",
-        "if-none-match",
-        "keep-alive",
-        "pragma",
-        "proxy-authenticate",
-        "public",
-        "server",
-        "set-cookie",
-        "te",
-        "trailer",
-        "transfer-encoding",
-        "upgrade",
-        "user-agent",
-        "vary",
-        "via",
-        "warning",
-        "www-authenticate"
+    static constexpr ASCIILiteral appendableHeaders[] = {
+        "access-control-allow-headers"_s,
+        "access-control-allow-methods"_s,
+        "access-control-allow-origin"_s,
+        "access-control-expose-headers"_s,
+        "allow"_s,
+        "cache-control"_s,
+        "connection"_s,
+        "content-encoding"_s,
+        "content-language"_s,
+        "if-match"_s,
+        "if-none-match"_s,
+        "keep-alive"_s,
+        "pragma"_s,
+        "proxy-authenticate"_s,
+        "public"_s,
+        "server"_s,
+        "set-cookie"_s,
+        "te"_s,
+        "trailer"_s,
+        "transfer-encoding"_s,
+        "upgrade"_s,
+        "user-agent"_s,
+        "vary"_s,
+        "via"_s,
+        "warning"_s,
+        "www-authenticate"_s
     };
 
     // Custom headers start with 'X-', and need no further checking.

Modified: trunk/Source/WebCore/platform/playstation/MIMETypeRegistryPlayStation.cpp (293560 => 293561)


--- trunk/Source/WebCore/platform/playstation/MIMETypeRegistryPlayStation.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/platform/playstation/MIMETypeRegistryPlayStation.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -60,7 +60,7 @@
 String MIMETypeRegistry::mimeTypeForExtension(StringView extension)
 {
     for (auto& entry : platformMediaTypes()) {
-        if (equalIgnoringASCIICase(extension, entry.extension.characters()))
+        if (equalIgnoringASCIICase(extension, entry.extension))
             return entry.type;
     }
     return emptyString();
@@ -74,7 +74,7 @@
 String MIMETypeRegistry::preferredExtensionForMIMEType(const String& mimeType)
 {
     for (auto& entry : platformMediaTypes()) {
-        if (equalIgnoringASCIICase(mimeType, entry.type.characters()))
+        if (equalIgnoringASCIICase(mimeType, entry.type))
             return entry.extension;
     }
     return emptyString();

Modified: trunk/Source/WebCore/style/ElementRuleCollector.h (293560 => 293561)


--- trunk/Source/WebCore/style/ElementRuleCollector.h	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/style/ElementRuleCollector.h	2022-04-28 04:03:12 UTC (rev 293561)
@@ -80,7 +80,7 @@
 
     void setMode(SelectorChecker::Mode mode) { m_mode = mode; }
     void setPseudoElementRequest(const PseudoElementRequest& request) { m_pseudoElementRequest = request; }
-    void setMedium(const MediaQueryEvaluator* medium) { m_isPrintStyle = medium->mediaTypeMatchSpecific("print"); }
+    void setMedium(const MediaQueryEvaluator* medium) { m_isPrintStyle = medium->mediaTypeMatchSpecific("print"_s); }
 
     bool hasAnyMatchingRules(const RuleSet&);
 

Modified: trunk/Source/WebCore/svg/SVGToOTFFontConversion.cpp (293560 => 293561)


--- trunk/Source/WebCore/svg/SVGToOTFFontConversion.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/svg/SVGToOTFFontConversion.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -234,7 +234,7 @@
     size_t finishAppendingKERNSubtable(Vector<KerningData>, uint16_t coverage);
 
     void appendLigatureSubtable(size_t subtableRecordLocation);
-    void appendArabicReplacementSubtable(size_t subtableRecordLocation, const char arabicForm[]);
+    void appendArabicReplacementSubtable(size_t subtableRecordLocation, ASCIILiteral arabicForm);
     void appendScriptSubtable(unsigned featureCount);
     Vector<Glyph, 1> glyphsForCodepoint(UChar32) const;
     Glyph firstGlyph(const Vector<Glyph, 1>&, UChar32) const;
@@ -807,7 +807,7 @@
     }
 }
 
-void SVGToOTFFontConverter::appendArabicReplacementSubtable(size_t subtableRecordLocation, const char arabicForm[])
+void SVGToOTFFontConverter::appendArabicReplacementSubtable(size_t subtableRecordLocation, ASCIILiteral arabicForm)
 {
     Vector<std::pair<Glyph, Glyph>> arabicFinalReplacements;
     for (auto& pair : m_codepointsToIndicesMap) {
@@ -929,9 +929,9 @@
     }
 
     appendLigatureSubtable(subtableRecordLocations[0]);
-    appendArabicReplacementSubtable(subtableRecordLocations[1], "terminal");
-    appendArabicReplacementSubtable(subtableRecordLocations[2], "medial");
-    appendArabicReplacementSubtable(subtableRecordLocations[3], "initial");
+    appendArabicReplacementSubtable(subtableRecordLocations[1], "terminal"_s);
+    appendArabicReplacementSubtable(subtableRecordLocations[2], "medial"_s);
+    appendArabicReplacementSubtable(subtableRecordLocations[3], "initial"_s);
 
     // Manually append empty "rlig" subtable
     overwrite16(subtableRecordLocations[4] + 6, m_result.size() - subtableRecordLocations[4]);

Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (293560 => 293561)


--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -81,7 +81,7 @@
 static void replaceCharsetInMediaTypeIfNeeded(String& mediaType)
 {
     auto parsedContentType = ParsedContentType::create(mediaType);
-    if (!parsedContentType || parsedContentType->charset().isEmpty() || equalIgnoringASCIICase(parsedContentType->charset(), "UTF-8"))
+    if (!parsedContentType || parsedContentType->charset().isEmpty() || equalIgnoringASCIICase(parsedContentType->charset(), "UTF-8"_s))
         return;
 
     parsedContentType->setCharset("UTF-8"_s);

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm (293560 => 293561)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameLoaderClient.mm	2022-04-28 04:03:12 UTC (rev 293561)
@@ -1653,7 +1653,7 @@
     return WebCore::ObjectContentType::None;
 }
 
-static AtomString parameterValue(const Vector<AtomString>& paramNames, const Vector<AtomString>& paramValues, const char* name)
+static AtomString parameterValue(const Vector<AtomString>& paramNames, const Vector<AtomString>& paramValues, ASCIILiteral name)
 {
     size_t size = paramNames.size();
     ASSERT(size == paramValues.size());
@@ -1857,7 +1857,7 @@
     if (errorCode && m_webFrame) {
         WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
         if (implementations->plugInFailedWithErrorFunc) {
-            URL pluginPageURL = document->completeURL(WebCore::stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage")));
+            URL pluginPageURL = document->completeURL(WebCore::stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage"_s)));
             if (!pluginPageURL.protocolIsInHTTPFamily())
                 pluginPageURL = URL();
             NSString *pluginName = pluginPackage ? (NSString *)[pluginPackage pluginInfo].name : nil;

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp (293560 => 293561)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -118,7 +118,7 @@
     auto a = StringImpl::createFromLiteral("aBcDeFG"_s);
     auto b = StringImpl::createFromLiteral("ABCDEFG"_s);
     auto c = StringImpl::createFromLiteral("abcdefg"_s);
-    const char d[] = "aBcDeFG";
+    constexpr auto d = "aBcDeFG"_s;
     auto empty = StringImpl::create(reinterpret_cast<const LChar*>(""));
     auto shorter = StringImpl::createFromLiteral("abcdef"_s);
     auto different = StringImpl::createFromLiteral("abcrefg"_s);
@@ -179,7 +179,6 @@
     auto b = stringFromUTF8("ABCÉEFG");
     auto c = stringFromUTF8("ABCéEFG");
     auto d = stringFromUTF8("abcéefg");
-    const char e[] = "aBcéeFG";
 
     // Identity.
     ASSERT_TRUE(equalIgnoringASCIICase(a.ptr(), a.ptr()));
@@ -194,10 +193,6 @@
     ASSERT_FALSE(equalIgnoringASCIICase(b.ptr(), c.ptr()));
     ASSERT_FALSE(equalIgnoringASCIICase(b.ptr(), d.ptr()));
     ASSERT_TRUE(equalIgnoringASCIICase(c.ptr(), d.ptr()));
-    ASSERT_FALSE(equalIgnoringASCIICase(a.ptr(), e));
-    ASSERT_FALSE(equalIgnoringASCIICase(b.ptr(), e));
-    ASSERT_FALSE(equalIgnoringASCIICase(c.ptr(), e));
-    ASSERT_FALSE(equalIgnoringASCIICase(d.ptr(), e));
 }
 
 TEST(WTF, StringImplFindIgnoringASCIICaseBasic)

Modified: trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp (293560 => 293561)


--- trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp	2022-04-28 03:23:01 UTC (rev 293560)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/StringView.cpp	2022-04-28 04:03:12 UTC (rev 293561)
@@ -338,7 +338,7 @@
     RefPtr<StringImpl> a = StringImpl::createFromLiteral("aBcDeFG"_s);
     RefPtr<StringImpl> b = StringImpl::createFromLiteral("ABCDEFG"_s);
     RefPtr<StringImpl> c = StringImpl::createFromLiteral("abcdefg"_s);
-    const char d[] = "aBcDeFG";
+    constexpr auto d = "aBcDeFG"_s;
     RefPtr<StringImpl> empty = StringImpl::create(reinterpret_cast<const LChar*>(""));
     RefPtr<StringImpl> shorter = StringImpl::createFromLiteral("abcdef"_s);
     RefPtr<StringImpl> different = StringImpl::createFromLiteral("abcrefg"_s);
@@ -398,7 +398,6 @@
     RefPtr<StringImpl> b = StringImpl::create(reinterpret_cast<const LChar*>("ABCÉEFG"));
     RefPtr<StringImpl> c = StringImpl::create(reinterpret_cast<const LChar*>("ABCéEFG"));
     RefPtr<StringImpl> d = StringImpl::create(reinterpret_cast<const LChar*>("abcéefg"));
-    const char e[] = "aBcéeFG";
     StringView stringViewA(*a.get());
     StringView stringViewB(*b.get());
     StringView stringViewC(*c.get());
@@ -417,10 +416,6 @@
     ASSERT_FALSE(equalIgnoringASCIICase(stringViewB, stringViewC));
     ASSERT_FALSE(equalIgnoringASCIICase(stringViewB, stringViewD));
     ASSERT_TRUE(equalIgnoringASCIICase(stringViewC, stringViewD));
-    ASSERT_FALSE(equalIgnoringASCIICase(stringViewA, e));
-    ASSERT_FALSE(equalIgnoringASCIICase(stringViewB, e));
-    ASSERT_FALSE(equalIgnoringASCIICase(stringViewC, e));
-    ASSERT_FALSE(equalIgnoringASCIICase(stringViewD, e));
 }
 
 TEST(WTF, StringViewFindIgnoringASCIICaseBasic)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to