Skip to content
Permalink
Browse files
Have equalIgnoringASCIICase() take in an ASCIILiteral instead of a co…
…nst 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
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293561 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
cdumez committed Apr 28, 2022
1 parent 3d8fd90 commit 7e967ef22be48012e6a4e53f9b0d87052a04b3ef
Show file tree
Hide file tree
Showing 35 changed files with 149 additions and 151 deletions.
@@ -191,7 +191,8 @@ inline bool operator!=(const Vector<UChar>& a, const AtomString& b) { return !(a
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 @@ inline bool equalIgnoringASCIICase(const String& a, const AtomString& b)
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);
}
@@ -550,12 +550,29 @@ inline bool equalIgnoringASCIICase(const char* a, const char* b)
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();
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;
@@ -580,8 +580,10 @@ WTF_EXPORT_PRIVATE bool equalIgnoringNullity(const UChar*, size_t length, String

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 @@ inline bool equalIgnoringASCIICase(const StringImpl& a, const StringImpl& b)
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);
}
@@ -222,7 +222,7 @@ bool equal(StringView, StringView);
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 @@ inline bool equalIgnoringASCIICase(StringView a, StringView b)
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());
@@ -360,7 +360,7 @@ template<size_t inlineCapacity> inline bool operator!=(const String& a, const Ve

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,14 +582,9 @@ inline bool equalIgnoringASCIICase(const String& a, const String& b)
return equalIgnoringASCIICase(a.impl(), b.impl());
}

inline bool equalIgnoringASCIICase(const String& a, const char* b)
{
return equalIgnoringASCIICase(a.impl(), b);
}

inline bool equalIgnoringASCIICase(const String& a, ASCIILiteral b)
{
return equalIgnoringASCIICase(a.impl(), b.characters());
return equalIgnoringASCIICase(a.impl(), b);
}

inline bool startsWithLettersIgnoringASCIICase(const String& string, ASCIILiteral literal)
@@ -33,7 +33,7 @@ namespace WTF {
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, '_', '-');
@@ -268,7 +268,7 @@ std::optional<String> PaymentCoordinator::validatedPaymentNetwork(Document&, uns
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);
@@ -1401,7 +1401,7 @@ String AccessibilityNodeObject::ariaAccessibilityDescription() const
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 @@ Element* AccessibilityNodeObject::menuElementForMenuButton() const
if (ariaRoleAttribute() != AccessibilityRole::MenuButton)
return nullptr;

return siblingWithAriaRole(node(), "menu");
return siblingWithAriaRole(node(), "menu"_s);
}

AccessibilityObject* AccessibilityNodeObject::menuForMenuButton() const
@@ -1437,7 +1437,7 @@ Element* AccessibilityNodeObject::menuItemElementForMenu() const
if (ariaRoleAttribute() != AccessibilityRole::Menu)
return nullptr;

return siblingWithAriaRole(node(), "menuitem");
return siblingWithAriaRole(node(), "menuitem"_s);
}

AccessibilityObject* AccessibilityNodeObject::menuButtonForMenu() const
@@ -3027,7 +3027,7 @@ String AccessibilityObject::popupValue() const

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;
}

@@ -143,11 +143,11 @@ bool MediaQueryEvaluator::mediaTypeMatch(const String& mediaTypeToMatch) const
|| 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);
}
@@ -77,7 +77,7 @@ class MediaQueryEvaluator {
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;
@@ -8687,17 +8687,13 @@ RefPtr<HTMLAttachmentElement> Document::attachmentForIdentifier(const String& id

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;
@@ -83,11 +83,13 @@ void SecurityContext::enforceSandboxFlags(SandboxFlags mask, SandboxFlagsSource

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;
}
@@ -94,7 +94,7 @@ bool HiddenInputType::appendFormData(DOMFormData& formData) const
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;
}
@@ -103,14 +103,14 @@ LinkRelAttribute::LinkRelAttribute(Document& document, const String& rel)
// 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;
}
@@ -2710,25 +2710,25 @@ WebGLExtension* WebGL2RenderingContext::getExtension(const String& name)
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;
}

0 comments on commit 7e967ef

Please sign in to comment.