Diff
Modified: trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp (293308 => 293309)
--- trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -265,7 +265,7 @@
std::optional<String> PaymentCoordinator::validatedPaymentNetwork(Document&, unsigned version, const String& paymentNetwork) const
{
- if (version < 2 && equalIgnoringASCIICase(paymentNetwork, "jcb"))
+ if (version < 2 && equalLettersIgnoringASCIICase(paymentNetwork, "jcb"))
return std::nullopt;
if (version < 3 && equalIgnoringASCIICase(paymentNetwork, "carteBancaire"))
Modified: trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp (293308 => 293309)
--- trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -175,7 +175,7 @@
auto parseMultipartBoundary = [] (const std::optional<MimeType>& mimeType) -> std::optional<String> {
if (!mimeType)
return std::nullopt;
- if (equalIgnoringASCIICase(mimeType->type, "multipart") && equalIgnoringASCIICase(mimeType->subtype, "form-data")) {
+ if (equalLettersIgnoringASCIICase(mimeType->type, "multipart") && equalLettersIgnoringASCIICase(mimeType->subtype, "form-data")) {
auto iterator = mimeType->parameters.find<HashTranslatorASCIILiteral>("boundary"_s);
if (iterator != mimeType->parameters.end())
return iterator->value;
@@ -201,7 +201,7 @@
currentBoundary = nextBoundary;
nextBoundary = static_cast<const uint8_t*>(memmem(nextBoundary + boundaryLength, length - (nextBoundary + boundaryLength - data), boundary.data(), boundaryLength));
}
- } else if (mimeType && equalIgnoringASCIICase(mimeType->type, "application") && equalIgnoringASCIICase(mimeType->subtype, "x-www-form-urlencoded")) {
+ } else if (mimeType && equalLettersIgnoringASCIICase(mimeType->type, "application") && equalLettersIgnoringASCIICase(mimeType->subtype, "x-www-form-urlencoded")) {
auto dataString = String::fromUTF8(data, length);
for (auto& pair : WTF::URLParser::parseURLEncodedForm(dataString))
form->append(pair.key, pair.value);
Modified: trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -242,7 +242,7 @@
if (!willMutate())
return { };
- bool important = equalIgnoringASCIICase(priority, "important");
+ bool important = equalLettersIgnoringASCIICase(priority, "important");
if (!important && !priority.isEmpty())
return { };
Modified: trunk/Source/WebCore/css/parser/CSSAtRuleID.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/parser/CSSAtRuleID.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/parser/CSSAtRuleID.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -30,39 +30,30 @@
#include "config.h"
#include "CSSAtRuleID.h"
+#include <wtf/SortedArrayMap.h>
+
namespace WebCore {
CSSAtRuleID cssAtRuleID(StringView name)
{
- if (equalIgnoringASCIICase(name, "charset"))
- return CSSAtRuleCharset;
- if (equalIgnoringASCIICase(name, "font-face"))
- return CSSAtRuleFontFace;
- if (equalIgnoringASCIICase(name, "font-palette-values"))
- return CSSAtRuleFontPaletteValues;
- if (equalIgnoringASCIICase(name, "import"))
- return CSSAtRuleImport;
- if (equalIgnoringASCIICase(name, "keyframes"))
- return CSSAtRuleKeyframes;
- if (equalIgnoringASCIICase(name, "media"))
- return CSSAtRuleMedia;
- if (equalIgnoringASCIICase(name, "namespace"))
- return CSSAtRuleNamespace;
- if (equalIgnoringASCIICase(name, "page"))
- return CSSAtRulePage;
- if (equalIgnoringASCIICase(name, "supports"))
- return CSSAtRuleSupports;
- if (equalIgnoringASCIICase(name, "viewport"))
- return CSSAtRuleViewport;
- if (equalIgnoringASCIICase(name, "-webkit-keyframes"))
- return CSSAtRuleWebkitKeyframes;
- if (equalIgnoringASCIICase(name, "counter-style"))
- return CSSAtRuleCounterStyle;
- if (equalIgnoringASCIICase(name, "layer"))
- return CSSAtRuleLayer;
- if (equalIgnoringASCIICase(name, "container"))
- return CSSAtRuleContainer;
- return CSSAtRuleInvalid;
+ static constexpr std::pair<ComparableLettersLiteral, CSSAtRuleID> mappings[] = {
+ { "-webkit-keyframes", CSSAtRuleWebkitKeyframes },
+ { "charset", CSSAtRuleCharset },
+ { "container", CSSAtRuleContainer },
+ { "counter-style", CSSAtRuleCounterStyle },
+ { "font-face", CSSAtRuleFontFace },
+ { "font-palette-values", CSSAtRuleFontPaletteValues },
+ { "import", CSSAtRuleImport },
+ { "keyframes", CSSAtRuleKeyframes },
+ { "layer", CSSAtRuleLayer },
+ { "media", CSSAtRuleMedia },
+ { "namespace", CSSAtRuleNamespace },
+ { "page", CSSAtRulePage },
+ { "supports", CSSAtRuleSupports },
+ { "viewport", CSSAtRuleViewport },
+ };
+ static constexpr SortedArrayMap cssAtRules { mappings };
+ return cssAtRules.get(name, CSSAtRuleInvalid);
}
} // namespace WebCore
Modified: trunk/Source/WebCore/css/parser/CSSParserImpl.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/parser/CSSParserImpl.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/parser/CSSParserImpl.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -486,7 +486,7 @@
if (token.type() == StringToken || token.type() == UrlToken)
return range.consumeIncludingWhitespace().value().toAtomString();
- if (token.type() != FunctionToken || !equalIgnoringASCIICase(token.value(), "url"))
+ if (token.type() != FunctionToken || !equalLettersIgnoringASCIICase(token.value(), "url"))
return AtomString();
CSSParserTokenRange contents = range.consumeBlock();
@@ -551,7 +551,7 @@
return { };
auto& token = prelude.peek();
- if (token.type() == FunctionToken && equalIgnoringASCIICase(token.value(), "layer")) {
+ if (token.type() == FunctionToken && equalLettersIgnoringASCIICase(token.value(), "layer")) {
auto savedPreludeForFailure = prelude;
auto contents = CSSPropertyParserHelpers::consumeFunction(prelude);
auto layerName = consumeCascadeLayerName(contents, AllowAnonymous::No);
@@ -561,7 +561,7 @@
}
return layerName;
}
- if (token.type() == IdentToken && equalIgnoringASCIICase(token.value(), "layer")) {
+ if (token.type() == IdentToken && equalLettersIgnoringASCIICase(token.value(), "layer")) {
prelude.consumeIncludingWhitespace();
return CascadeLayerName { };
}
@@ -1014,7 +1014,7 @@
auto end = range.end();
removeTrailingWhitespace(range, end);
declarationValueEnd = end;
- if (end[-1].type() == IdentToken && equalIgnoringASCIICase(end[-1].value(), "important")) {
+ if (end[-1].type() == IdentToken && equalLettersIgnoringASCIICase(end[-1].value(), "important")) {
--end;
removeTrailingWhitespace(range, end);
if (end[-1].type() == DelimiterToken && end[-1].delimiter() == '!') {
@@ -1070,9 +1070,9 @@
const CSSParserToken& token = range.consumeIncludingWhitespace();
if (token.type() == PercentageToken && token.numericValue() >= 0 && token.numericValue() <= 100)
result.append(token.numericValue() / 100);
- else if (token.type() == IdentToken && equalIgnoringASCIICase(token.value(), "from"))
+ else if (token.type() == IdentToken && equalLettersIgnoringASCIICase(token.value(), "from"))
result.append(0);
- else if (token.type() == IdentToken && equalIgnoringASCIICase(token.value(), "to"))
+ else if (token.type() == IdentToken && equalLettersIgnoringASCIICase(token.value(), "to"))
result.append(1);
else
return { }; // Parser error, invalid value in keyframe selector
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -1374,7 +1374,7 @@
if (range.peek().type() == StringToken) {
const CSSParserToken& token = range.consumeIncludingWhitespace();
- if (equalIgnoringASCIICase(token.value(), "none"))
+ if (equalLettersIgnoringASCIICase(token.value(), "none"))
return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
return CSSValuePool::singleton().createValue(token.value().toString(), CSSUnitType::CSS_STRING);
}
Modified: trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -709,7 +709,7 @@
if (block.peek().type() != IdentToken)
return nullptr;
const CSSParserToken& ident = block.consume();
- if (!equalIgnoringASCIICase(ident.value(), "of"))
+ if (!equalLettersIgnoringASCIICase(ident.value(), "of"))
return nullptr;
if (block.peek().type() != WhitespaceToken)
return nullptr;
@@ -883,7 +883,7 @@
if (range.peek().type() != IdentToken)
return CSSSelector::CaseSensitive;
const CSSParserToken& flag = range.consumeIncludingWhitespace();
- if (equalIgnoringASCIICase(flag.value(), "i"))
+ if (equalLettersIgnoringASCIICase(flag.value(), "i"))
return CSSSelector::CaseInsensitive;
m_failedParsing = true;
return CSSSelector::CaseSensitive;
@@ -920,11 +920,11 @@
return true;
}
if (token.type() == IdentToken) {
- if (equalIgnoringASCIICase(token.value(), "odd")) {
+ if (equalLettersIgnoringASCIICase(token.value(), "odd")) {
result = std::make_pair(2, 1);
return true;
}
- if (equalIgnoringASCIICase(token.value(), "even")) {
+ if (equalLettersIgnoringASCIICase(token.value(), "even")) {
result = std::make_pair(2, 0);
return true;
}
Modified: trunk/Source/WebCore/css/parser/CSSSupportsParser.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/parser/CSSSupportsParser.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/parser/CSSSupportsParser.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -57,7 +57,7 @@
CSSSupportsParser::SupportsResult CSSSupportsParser::consumeCondition(CSSParserTokenRange range)
{
if (range.peek().type() == IdentToken || range.peek().type() == FunctionToken) {
- if (equalIgnoringASCIICase(range.peek().value(), "not"))
+ if (equalLettersIgnoringASCIICase(range.peek().value(), "not"))
return consumeNegation(range);
}
@@ -92,8 +92,8 @@
if (clauseType == Unresolved)
clauseType = token.value().length() == 3 ? Conjunction : Disjunction;
- if ((clauseType == Conjunction && !equalIgnoringASCIICase(token.value(), "and"))
- || (clauseType == Disjunction && !equalIgnoringASCIICase(token.value(), "or")))
+ if ((clauseType == Conjunction && !equalLettersIgnoringASCIICase(token.value(), "and"))
+ || (clauseType == Disjunction && !equalLettersIgnoringASCIICase(token.value(), "or")))
return Invalid;
if (token.type() == IdentToken)
Modified: trunk/Source/WebCore/css/parser/CSSTokenizer.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/parser/CSSTokenizer.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/parser/CSSTokenizer.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -595,7 +595,7 @@
{
StringView name = consumeName();
if (consumeIfNext('(')) {
- if (equalIgnoringASCIICase(name, "url")) {
+ if (equalLettersIgnoringASCIICase(name, "url")) {
// The spec is slightly different so as to avoid dropping whitespace
// tokens, but they wouldn't be used and this is easier.
m_input.advanceUntilNonWhitespace();
Modified: trunk/Source/WebCore/css/parser/MediaQueryParser.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/parser/MediaQueryParser.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/parser/MediaQueryParser.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -113,7 +113,7 @@
void MediaQueryParser::readMediaNot(CSSParserTokenType type, const CSSParserToken& token, CSSParserTokenRange& range)
{
- if (type == IdentToken && equalIgnoringASCIICase(token.value(), "not"))
+ if (type == IdentToken && equalLettersIgnoringASCIICase(token.value(), "not"))
setStateAndRestrict(ReadFeatureStart, MediaQuery::Not);
else
readFeatureStart(type, token, range);
@@ -128,10 +128,10 @@
static bool isRestrictorOrLogicalOperator(const CSSParserToken& token)
{
// FIXME: it would be more efficient to use lower-case always for tokenValue.
- return equalIgnoringASCIICase(token.value(), "not")
- || equalIgnoringASCIICase(token.value(), "and")
- || equalIgnoringASCIICase(token.value(), "or")
- || equalIgnoringASCIICase(token.value(), "only");
+ return equalLettersIgnoringASCIICase(token.value(), "not")
+ || equalLettersIgnoringASCIICase(token.value(), "and")
+ || equalLettersIgnoringASCIICase(token.value(), "or")
+ || equalLettersIgnoringASCIICase(token.value(), "only");
}
void MediaQueryParser::readMediaType(CSSParserTokenType type, const CSSParserToken& token, CSSParserTokenRange& range)
@@ -142,9 +142,9 @@
else
m_state = ReadFeature;
} else if (type == IdentToken) {
- if (m_state == ReadRestrictor && equalIgnoringASCIICase(token.value(), "not"))
+ if (m_state == ReadRestrictor && equalLettersIgnoringASCIICase(token.value(), "not"))
setStateAndRestrict(ReadMediaType, MediaQuery::Not);
- else if (m_state == ReadRestrictor && equalIgnoringASCIICase(token.value(), "only"))
+ else if (m_state == ReadRestrictor && equalLettersIgnoringASCIICase(token.value(), "only"))
setStateAndRestrict(ReadMediaType, MediaQuery::Only);
else if (m_mediaQueryData.restrictor() != MediaQuery::None
&& isRestrictorOrLogicalOperator(token)) {
@@ -174,7 +174,7 @@
void MediaQueryParser::readAnd(CSSParserTokenType type, const CSSParserToken& token, CSSParserTokenRange& /*range*/)
{
- if (type == IdentToken && equalIgnoringASCIICase(token.value(), "and")) {
+ if (type == IdentToken && equalLettersIgnoringASCIICase(token.value(), "and")) {
m_state = ReadFeatureStart;
} else if (type == CommaToken && m_parserType != MediaConditionParser) {
commitMediaQuery();
Modified: trunk/Source/WebCore/css/parser/SizesCalcParser.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/parser/SizesCalcParser.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/parser/SizesCalcParser.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -130,7 +130,7 @@
return false;
break;
case FunctionToken:
- if (!equalIgnoringASCIICase(token.value(), "calc"))
+ if (!equalLettersIgnoringASCIICase(token.value(), "calc"))
return false;
// "calc(" is the same as "("
FALLTHROUGH;
Modified: trunk/Source/WebCore/css/typedom/transform/CSSPerspective.cpp (293308 => 293309)
--- trunk/Source/WebCore/css/typedom/transform/CSSPerspective.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/css/typedom/transform/CSSPerspective.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -47,7 +47,7 @@
// https://drafts.css-houdini.org/css-typed-om/#dom-cssperspective-cssperspective
auto checkKeywordValue = [] (RefPtr<CSSKeywordValue> value) -> ExceptionOr<CSSPerspectiveValue> {
RELEASE_ASSERT(value);
- if (!equalIgnoringASCIICase(value->value(), "none"))
+ if (!equalLettersIgnoringASCIICase(value->value(), "none"))
return Exception { TypeError };
return { WTFMove(value) };
};
Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (293308 => 293309)
--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm 2022-04-25 04:45:02 UTC (rev 293309)
@@ -184,7 +184,7 @@
bool DataDetection::requiresExtendedContext(Element& element)
{
- return equalIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectors_typeAttr), "calendar-event");
+ return equalLettersIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectors_typeAttr), "calendar-event");
}
String DataDetection::dataDetectorIdentifier(Element& element)
@@ -276,7 +276,7 @@
if (!elementParent)
return;
- bool elementIsDDAnchor = is<HTMLAnchorElement>(element) && equalIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true");
+ bool elementIsDDAnchor = is<HTMLAnchorElement>(element) && equalLettersIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true");
if (!elementIsDDAnchor)
return;
@@ -292,7 +292,7 @@
for (Node* node = &startNode; node; node = NodeTraversal::next(*node)) {
if (is<HTMLAnchorElement>(*node)) {
auto& anchor = downcast<HTMLAnchorElement>(*node);
- if (!equalIgnoringASCIICase(anchor.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true"))
+ if (!equalLettersIgnoringASCIICase(anchor.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true"))
return true;
removeResultLinksFromAnchor(anchor);
}
@@ -301,7 +301,7 @@
// If we found the end node and no link, return false unless an ancestor node is a link.
// The only ancestors not tested at this point are in the direct line from self's parent to the top.
for (auto& anchor : ancestorsOfType<HTMLAnchorElement>(startNode)) {
- if (!equalIgnoringASCIICase(anchor.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true"))
+ if (!equalLettersIgnoringASCIICase(anchor.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true"))
return true;
removeResultLinksFromAnchor(anchor);
}
@@ -689,7 +689,7 @@
bool DataDetection::isDataDetectorElement(const Element& element)
{
- return is<HTMLAnchorElement>(element) && equalIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true");
+ return is<HTMLAnchorElement>(element) && equalLettersIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true");
}
std::optional<std::pair<Ref<HTMLElement>, IntRect>> DataDetection::findDataDetectionResultElementInImageOverlay(const FloatPoint& location, const HTMLElement& imageOverlayHost)
Modified: trunk/Source/WebCore/html/Autofill.cpp (293308 => 293309)
--- trunk/Source/WebCore/html/Autofill.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/Autofill.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -247,7 +247,7 @@
// 15. If the indexth token in tokens is an ASCII case-insensitive match for one of the strings
// in the following list, then run the substeps that follow:
const auto& modeToken = tokens[index];
- if (equalIgnoringASCIICase(modeToken, "shipping") || equalIgnoringASCIICase(modeToken, "billing")) {
+ if (equalLettersIgnoringASCIICase(modeToken, "shipping") || equalLettersIgnoringASCIICase(modeToken, "billing")) {
// 1. Let mode be the matching string from the list above.
const auto& mode = modeToken;
Modified: trunk/Source/WebCore/html/EnterKeyHint.cpp (293308 => 293309)
--- trunk/Source/WebCore/html/EnterKeyHint.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/EnterKeyHint.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -27,26 +27,23 @@
#include "EnterKeyHint.h"
#include "CommonAtomStrings.h"
+#include <wtf/SortedArrayMap.h>
namespace WebCore {
-EnterKeyHint enterKeyHintForAttributeValue(const String& value)
+EnterKeyHint enterKeyHintForAttributeValue(StringView value)
{
- if (equalIgnoringASCIICase(value, "enter"))
- return EnterKeyHint::Enter;
- if (equalIgnoringASCIICase(value, "done"))
- return EnterKeyHint::Done;
- if (equalIgnoringASCIICase(value, "go"))
- return EnterKeyHint::Go;
- if (equalIgnoringASCIICase(value, "next"))
- return EnterKeyHint::Next;
- if (equalIgnoringASCIICase(value, "previous"))
- return EnterKeyHint::Previous;
- if (equalIgnoringASCIICase(value, "search"))
- return EnterKeyHint::Search;
- if (equalIgnoringASCIICase(value, "send"))
- return EnterKeyHint::Send;
- return EnterKeyHint::Unspecified;
+ static constexpr std::pair<ComparableLettersLiteral, EnterKeyHint> mappings[] = {
+ { "done", EnterKeyHint::Done },
+ { "enter", EnterKeyHint::Enter },
+ { "go", EnterKeyHint::Go },
+ { "next", EnterKeyHint::Next },
+ { "previous", EnterKeyHint::Previous },
+ { "search", EnterKeyHint::Search },
+ { "send", EnterKeyHint::Send }
+ };
+ static constexpr SortedArrayMap enterKeyHints { mappings };
+ return enterKeyHints.get(value, EnterKeyHint::Unspecified);
}
String attributeValueForEnterKeyHint(EnterKeyHint hint)
Modified: trunk/Source/WebCore/html/EnterKeyHint.h (293308 => 293309)
--- trunk/Source/WebCore/html/EnterKeyHint.h 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/EnterKeyHint.h 2022-04-25 04:45:02 UTC (rev 293309)
@@ -41,7 +41,7 @@
Send
};
-EnterKeyHint enterKeyHintForAttributeValue(const String&);
+EnterKeyHint enterKeyHintForAttributeValue(StringView);
String attributeValueForEnterKeyHint(EnterKeyHint);
} // namespace WebCore
Modified: trunk/Source/WebCore/html/HTMLAnchorElement.cpp (293308 => 293309)
--- trunk/Source/WebCore/html/HTMLAnchorElement.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/HTMLAnchorElement.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -315,12 +315,12 @@
if (!m_relList) {
m_relList = makeUnique<DOMTokenList>(*this, HTMLNames::relAttr, [](Document& document, StringView token) {
#if USE(SYSTEM_PREVIEW)
- if (equalIgnoringASCIICase(token, "ar"))
+ if (equalLettersIgnoringASCIICase(token, "ar"))
return document.settings().systemPreviewEnabled();
#else
UNUSED_PARAM(document);
#endif
- return equalIgnoringASCIICase(token, "noreferrer") || equalIgnoringASCIICase(token, "noopener") || equalIgnoringASCIICase(token, "opener");
+ return equalLettersIgnoringASCIICase(token, "noreferrer") || equalLettersIgnoringASCIICase(token, "noopener") || equalLettersIgnoringASCIICase(token, "opener");
});
}
return *m_relList;
Modified: trunk/Source/WebCore/html/HTMLFormElement.cpp (293308 => 293309)
--- trunk/Source/WebCore/html/HTMLFormElement.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/HTMLFormElement.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -81,11 +81,11 @@
{
FormRelAttributes attributes;
for (auto token : string.split(' ')) {
- if (equalIgnoringASCIICase(token, "noopener"))
+ if (equalLettersIgnoringASCIICase(token, "noopener"))
attributes.noopener = true;
- else if (equalIgnoringASCIICase(token, "noreferrer"))
+ else if (equalLettersIgnoringASCIICase(token, "noreferrer"))
attributes.noreferrer = true;
- else if (equalIgnoringASCIICase(token, "opener"))
+ else if (equalLettersIgnoringASCIICase(token, "opener"))
attributes.opener = true;
}
return attributes;
@@ -757,7 +757,7 @@
{
if (!m_relList) {
m_relList = makeUnique<DOMTokenList>(*this, HTMLNames::relAttr, [](Document&, StringView token) {
- return equalIgnoringASCIICase(token, "noreferrer") || equalIgnoringASCIICase(token, "noopener") || equalIgnoringASCIICase(token, "opener");
+ return equalLettersIgnoringASCIICase(token, "noreferrer") || equalLettersIgnoringASCIICase(token, "noopener") || equalLettersIgnoringASCIICase(token, "opener");
});
}
return *m_relList;
Modified: trunk/Source/WebCore/html/HTMLImageElement.cpp (293308 => 293309)
--- trunk/Source/WebCore/html/HTMLImageElement.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/HTMLImageElement.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -289,7 +289,7 @@
{
if (crossoriginValue.isNull())
return NotSet;
- return equalIgnoringASCIICase(crossoriginValue, "use-credentials") ? UseCredentials : Anonymous;
+ return equalLettersIgnoringASCIICase(crossoriginValue, "use-credentials") ? UseCredentials : Anonymous;
}
void HTMLImageElement::attributeChanged(const QualifiedName& name, const AtomString& oldValue, const AtomString& newValue, AttributeModificationReason reason)
Modified: trunk/Source/WebCore/html/InputType.cpp (293308 => 293309)
--- trunk/Source/WebCore/html/InputType.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/InputType.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -954,7 +954,7 @@
newValue = newValue + stepRange.step() * Decimal::fromDouble(count);
const AtomString& stepString = element()->getAttribute(HTMLNames::stepAttr);
- if (!equalIgnoringASCIICase(stepString, "any"))
+ if (!equalLettersIgnoringASCIICase(stepString, "any"))
newValue = stepRange.alignValueForStep(current, newValue);
// 8. If the element has a minimum, and value is less than that minimum, then set value to the smallest value that, when subtracted from the step
Modified: trunk/Source/WebCore/html/LinkRelAttribute.cpp (293308 => 293309)
--- trunk/Source/WebCore/html/LinkRelAttribute.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/LinkRelAttribute.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -116,13 +116,13 @@
return true;
}
- if (document.settings().linkPreconnectEnabled() && equalIgnoringASCIICase(attribute, "preconnect"))
+ if (document.settings().linkPreconnectEnabled() && equalLettersIgnoringASCIICase(attribute, "preconnect"))
return true;
- if (document.settings().linkPreloadEnabled() && equalIgnoringASCIICase(attribute, "preload"))
+ if (document.settings().linkPreloadEnabled() && equalLettersIgnoringASCIICase(attribute, "preload"))
return true;
- if (document.settings().linkPrefetchEnabled() && equalIgnoringASCIICase(attribute, "prefetch"))
+ if (document.settings().linkPrefetchEnabled() && equalLettersIgnoringASCIICase(attribute, "prefetch"))
return true;
return false;
Modified: trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp (293308 => 293309)
--- trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -357,7 +357,7 @@
{
if (value.isNull())
return String();
- if (equalIgnoringASCIICase(value, "use-credentials"))
+ if (equalLettersIgnoringASCIICase(value, "use-credentials"))
return "use-credentials"_s;
return "anonymous"_s;
}
Modified: trunk/Source/WebCore/loader/DocumentLoader.cpp (293308 => 293309)
--- trunk/Source/WebCore/loader/DocumentLoader.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/loader/DocumentLoader.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -1550,7 +1550,7 @@
continue;
manifestURL = href;
- useCredentials = equalIgnoringASCIICase(link.attributeWithoutSynchronization(HTMLNames::crossoriginAttr), "use-credentials");
+ useCredentials = equalLettersIgnoringASCIICase(link.attributeWithoutSynchronization(HTMLNames::crossoriginAttr), "use-credentials");
break;
}
Modified: trunk/Source/WebCore/loader/LinkLoader.cpp (293308 => 293309)
--- trunk/Source/WebCore/loader/LinkLoader.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/loader/LinkLoader.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -214,7 +214,7 @@
return;
ASSERT(document.settings().linkPreconnectEnabled());
StoredCredentialsPolicy storageCredentialsPolicy = StoredCredentialsPolicy::Use;
- if (equalIgnoringASCIICase(params.crossOrigin, "anonymous") && document.securityOrigin().isSameOriginDomain(SecurityOrigin::create(href)))
+ if (equalLettersIgnoringASCIICase(params.crossOrigin, "anonymous") && document.securityOrigin().isSameOriginDomain(SecurityOrigin::create(href)))
storageCredentialsPolicy = StoredCredentialsPolicy::DoNotUse;
ASSERT(document.frame()->loader().networkingContext());
platformStrategies()->loaderStrategy()->preconnectTo(document.frame()->loader(), href, storageCredentialsPolicy, LoaderStrategy::ShouldPreconnectAsFirstParty::No, [weakDocument = WeakPtr { document }, href](ResourceError error) {
Modified: trunk/Source/WebCore/loader/ServerTiming.cpp (293308 => 293309)
--- trunk/Source/WebCore/loader/ServerTiming.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/loader/ServerTiming.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -30,7 +30,7 @@
void ServerTiming::setParameter(const String& name, const String& value)
{
- if (equalIgnoringASCIICase(name, "dur")) {
+ if (equalLettersIgnoringASCIICase(name, "dur")) {
if (!durationSet) {
duration = value.toDouble();
durationSet = true;
@@ -37,7 +37,7 @@
}
return;
}
- if (equalIgnoringASCIICase(name, "desc")) {
+ if (equalLettersIgnoringASCIICase(name, "desc")) {
if (!descriptionSet) {
description = value;
descriptionSet = true;
Modified: trunk/Source/WebCore/page/PageConsoleClient.cpp (293308 => 293309)
--- trunk/Source/WebCore/page/PageConsoleClient.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/page/PageConsoleClient.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -415,7 +415,7 @@
// FIXME: <https://webkit.org/b/180833> Web Inspector: support OffscreenCanvas for Canvas related operations
} else {
String base64;
- if (possibleTarget.getString(lexicalGlobalObject, base64) && base64.startsWithIgnoringASCIICase("data:") && base64.length() > 5) {
+ if (possibleTarget.getString(lexicalGlobalObject, base64) && startsWithLettersIgnoringASCIICase(base64, "data:") && base64.length() > 5) {
target = possibleTarget;
dataURL = base64;
}
Modified: trunk/Source/WebCore/page/Quirks.cpp (293308 => 293309)
--- trunk/Source/WebCore/page/Quirks.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/page/Quirks.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -363,7 +363,7 @@
bool Quirks::isGoogleMaps() const
{
auto& url = ""
- return topPrivatelyControlledDomain(url.host().toString()).startsWith("google.") && url.path().startsWithIgnoringASCIICase("/maps/");
+ return topPrivatelyControlledDomain(url.host().toString()).startsWith("google.") && startsWithLettersIgnoringASCIICase(url.path(), "/maps/");
}
bool Quirks::shouldDispatchSimulatedMouseEvents(EventTarget* target) const
@@ -389,10 +389,10 @@
if (host == "wix.com" || host.endsWith(".wix.com")) {
// Disable simulated mouse dispatching for template selection.
- return url.path().startsWithIgnoringASCIICase("/website/templates/") ? ShouldDispatchSimulatedMouseEvents::No : ShouldDispatchSimulatedMouseEvents::Yes;
+ return startsWithLettersIgnoringASCIICase(url.path(), "/website/templates/") ? ShouldDispatchSimulatedMouseEvents::No : ShouldDispatchSimulatedMouseEvents::Yes;
}
- if ((host == "desmos.com" || host.endsWith(".desmos.com")) && url.path().startsWithIgnoringASCIICase("/calculator/"))
+ if ((host == "desmos.com" || host.endsWith(".desmos.com")) && startsWithLettersIgnoringASCIICase(url.path(), "/calculator/"))
return ShouldDispatchSimulatedMouseEvents::Yes;
if (host == "figma.com" || host.endsWith(".figma.com"))
return ShouldDispatchSimulatedMouseEvents::Yes;
@@ -615,7 +615,7 @@
return false;
auto& url = ""
- return equalLettersIgnoringASCIICase(url.host(), "docs.google.com") && url.path().startsWithIgnoringASCIICase("/spreadsheets/");
+ return equalLettersIgnoringASCIICase(url.host(), "docs.google.com") && startsWithLettersIgnoringASCIICase(url.path(), "/spreadsheets/");
#else
return false;
#endif
Modified: trunk/Source/WebCore/page/SecurityOriginData.cpp (293308 => 293309)
--- trunk/Source/WebCore/page/SecurityOriginData.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/page/SecurityOriginData.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -80,7 +80,7 @@
// string because of a bug in how we handled the scheme for file URLs.
// Now that we've fixed that bug, we produce this string for compatibility
// with existing persistent state.
- if (equalIgnoringASCIICase(protocol, "file"))
+ if (equalLettersIgnoringASCIICase(protocol, "file"))
return "file__0"_s;
return makeString(protocol, separatorCharacter, FileSystem::encodeForFileName(host), separatorCharacter, port.value_or(0));
Modified: trunk/Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp (293308 => 293309)
--- trunk/Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -181,7 +181,7 @@
static bool schemeIsInHttpFamily(StringView scheme)
{
- return equalIgnoringASCIICase(scheme, "https") || equalIgnoringASCIICase(scheme, "http");
+ return equalLettersIgnoringASCIICase(scheme, "https") || equalLettersIgnoringASCIICase(scheme, "http");
}
static bool isRestrictedDirectiveForMode(const String& directive, ContentSecurityPolicyModeForExtension mode)
@@ -219,10 +219,10 @@
if (parsedSource.host.hasWildcard && hostIsPublicSuffix)
return false;
- if (equalIgnoringASCIICase(parsedSource.scheme, "blob"))
+ if (equalLettersIgnoringASCIICase(parsedSource.scheme, "blob"))
return true;
- if (!equalIgnoringASCIICase(parsedSource.scheme, "https") || parsedSource.host.value.isEmpty())
+ if (!equalLettersIgnoringASCIICase(parsedSource.scheme, "https") || parsedSource.host.value.isEmpty())
return false;
break;
case ContentSecurityPolicyModeForExtension::ManifestV3:
Modified: trunk/Source/WebCore/platform/graphics/FontGenericFamilies.cpp (293308 => 293309)
--- trunk/Source/WebCore/platform/graphics/FontGenericFamilies.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/graphics/FontGenericFamilies.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -48,9 +48,9 @@
{
const Vector<String>& preferredLanguages = userPreferredLanguages();
for (auto& language : preferredLanguages) {
- if (equalIgnoringASCIICase(language, "zh-tw"))
+ if (equalLettersIgnoringASCIICase(language, "zh-tw"))
return false;
- if (equalIgnoringASCIICase(language, "zh-cn"))
+ if (equalLettersIgnoringASCIICase(language, "zh-cn"))
return true;
}
return true;
Modified: trunk/Source/WebCore/platform/graphics/MIMETypeCache.cpp (293308 => 293309)
--- trunk/Source/WebCore/platform/graphics/MIMETypeCache.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/graphics/MIMETypeCache.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -138,7 +138,7 @@
// Some sites (e.g. Modernizr) use 'audio/mpeg; codecs="mp3"' even though
// it is not RFC 3003 compliant.
- if (equalIgnoringASCIICase(type.containerType(), "audio/mpeg")) {
+ if (equalLettersIgnoringASCIICase(type.containerType(), "audio/mpeg")) {
auto codecs = type.codecs();
return codecs.size() == 1 && codecs[0] == "mp3";
}
Modified: trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp (293308 => 293309)
--- trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -1107,7 +1107,7 @@
if (containerType == applicationOctetStream())
return SupportsType::IsNotSupported;
- if (!containerType.startsWithIgnoringASCIICase("video/") && !containerType.startsWithIgnoringASCIICase("audio/") && !containerType.startsWithIgnoringASCIICase("application/"))
+ if (!startsWithLettersIgnoringASCIICase(containerType.string(), "video/") && !startsWithLettersIgnoringASCIICase(containerType.string(), "audio/") && !startsWithLettersIgnoringASCIICase(containerType.string(), "application/"))
return SupportsType::IsNotSupported;
const MediaPlayerFactory* engine = bestMediaEngineForSupportParameters(parameters);
Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (293308 => 293309)
--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm 2022-04-25 04:45:02 UTC (rev 293309)
@@ -808,7 +808,7 @@
if (!SourceBufferParserWebM::isWebMFormatReaderAvailable())
return false;
- return equalIgnoringASCIICase(type, "video/webm") || equalIgnoringASCIICase(type, "audio/webm");
+ return equalLettersIgnoringASCIICase(type, "video/webm") || equalLettersIgnoringASCIICase(type, "audio/webm");
#else
UNUSED_PARAM(type);
return false;
@@ -2018,9 +2018,9 @@
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
static bool keySystemIsSupported(const String& keySystem)
{
- if (equalIgnoringASCIICase(keySystem, "com.apple.fps") || equalIgnoringASCIICase(keySystem, "com.apple.fps.1_0") || equalIgnoringASCIICase(keySystem, "org.w3c.clearkey"))
- return true;
- return false;
+ return equalLettersIgnoringASCIICase(keySystem, "com.apple.fps")
+ || equalIgnoringASCIICase(keySystem, "com.apple.fps.1_0")
+ || equalLettersIgnoringASCIICase(keySystem, "org.w3c.clearkey");
}
#endif
@@ -2053,7 +2053,7 @@
#if ENABLE(LEGACY_ENCRYPTED_MEDIA)
if (!keySystem.isEmpty()) {
// "Clear Key" is only supported with HLS:
- if (equalIgnoringASCIICase(keySystem, "org.w3c.clearkey") && !mimeType.isEmpty() && !equalIgnoringASCIICase(mimeType, "application/x-mpegurl"))
+ if (equalLettersIgnoringASCIICase(keySystem, "org.w3c.clearkey") && !mimeType.isEmpty() && !equalLettersIgnoringASCIICase(mimeType, "application/x-mpegurl"))
return false;
if (!keySystemIsSupported(keySystem))
Modified: trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp (293308 => 293309)
--- trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -1280,8 +1280,8 @@
return MediaPlayerEnums::SupportsType::IsNotSupported;
auto containerType = type.containerType();
- bool isAudioContainerType = equalIgnoringASCIICase(containerType, "audio/webm");
- bool isVideoContainerType = equalIgnoringASCIICase(containerType, "video/webm");
+ bool isAudioContainerType = equalLettersIgnoringASCIICase(containerType, "audio/webm");
+ bool isVideoContainerType = equalLettersIgnoringASCIICase(containerType, "video/webm");
if (!isAudioContainerType && !isVideoContainerType)
return MediaPlayerEnums::SupportsType::IsNotSupported;
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp (293308 => 293309)
--- trunk/Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -167,7 +167,7 @@
std::call_once(s_flag,
[&] {
const char* value = g_getenv("WEBKIT_GST_DMABUF_SINK_ENABLED");
- s_enabled = value && (equalIgnoringASCIICase(value, "true") || equalIgnoringASCIICase(value, "1"));
+ s_enabled = value && (equalLettersIgnoringASCIICase(value, "true") || equalLettersIgnoringASCIICase(value, "1"));
});
return s_enabled;
}
Modified: trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp (293308 => 293309)
--- trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -608,10 +608,10 @@
return;
}
auto containerType = contentType.containerType();
- if (equalIgnoringASCIICase(containerType, "video/vp8")) {
+ if (equalLettersIgnoringASCIICase(containerType, "video/vp8")) {
info.powerEfficient = false;
info.smooth = isVPSoftwareDecoderSmooth(*info.supportedConfiguration.video);
- } else if (equalIgnoringASCIICase(containerType, "video/vp9")) {
+ } else if (equalLettersIgnoringASCIICase(containerType, "video/vp9")) {
auto decodingInfo = computeVPParameters(*info.supportedConfiguration.video);
if (decodingInfo && !decodingInfo->supported && isSupportingVP9VTB()) {
callback({ });
@@ -659,7 +659,7 @@
info.supported = true;
#if PLATFORM(COCOA)
auto containerType = contentType.containerType();
- if (equalIgnoringASCIICase(containerType, "video/vp8") || equalIgnoringASCIICase(containerType, "video/vp9")) {
+ if (equalLettersIgnoringASCIICase(containerType, "video/vp8") || equalLettersIgnoringASCIICase(containerType, "video/vp9")) {
info.powerEfficient = false;
// FIXME: Provide more granular VPX encoder smoothness.
info.smooth = false;
Modified: trunk/Source/WebCore/platform/network/curl/CookieUtil.cpp (293308 => 293309)
--- trunk/Source/WebCore/platform/network/curl/CookieUtil.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/network/curl/CookieUtil.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -102,11 +102,11 @@
} else
attributeName = attribute.stripWhiteSpace();
- if (equalIgnoringASCIICase(attributeName, "httponly"))
+ if (equalLettersIgnoringASCIICase(attributeName, "httponly"))
result.httpOnly = true;
- else if (equalIgnoringASCIICase(attributeName, "secure"))
+ else if (equalLettersIgnoringASCIICase(attributeName, "secure"))
result.secure = true;
- else if (equalIgnoringASCIICase(attributeName, "domain")) {
+ else if (equalLettersIgnoringASCIICase(attributeName, "domain")) {
if (attributeValue.isEmpty())
return;
@@ -116,7 +116,7 @@
result.domain = attributeValue.convertToASCIILowercase();
- } else if (equalIgnoringASCIICase(attributeName, "max-age")) {
+ } else if (equalLettersIgnoringASCIICase(attributeName, "max-age")) {
if (auto maxAgeSeconds = parseIntegerAllowingTrailingJunk<int64_t>(attributeValue)) {
result.expires = (WallTime::now().secondsSinceEpoch().value() + *maxAgeSeconds) * msPerSecond;
result.session = false;
@@ -128,7 +128,7 @@
result.session = true;
result.expires = std::nullopt;
}
- } else if (equalIgnoringASCIICase(attributeName, "expires") && !hasMaxAge) {
+ } else if (equalLettersIgnoringASCIICase(attributeName, "expires") && !hasMaxAge) {
if (auto expiryTime = parseExpiresMS(attributeValue.utf8().data())) {
result.expires = expiryTime.value();
result.session = false;
@@ -136,7 +136,7 @@
result.session = true;
result.expires = std::nullopt;
}
- } else if (equalIgnoringASCIICase(attributeName, "path")) {
+ } else if (equalLettersIgnoringASCIICase(attributeName, "path")) {
if (!attributeValue.isEmpty() && attributeValue.startsWith('/'))
result.path = attributeValue;
else
Modified: trunk/Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp (293308 => 293309)
--- trunk/Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -62,7 +62,7 @@
auto contentType = header.substring(splitPosition + 1).stripWhiteSpace();
auto mimeType = extractMIMETypeFromMediaType(contentType);
- if (!equalIgnoringASCIICase(mimeType, "multipart/x-mixed-replace"))
+ if (!equalLettersIgnoringASCIICase(mimeType, "multipart/x-mixed-replace"))
continue;
auto boundary = extractBoundaryFromContentType(contentType);
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (293308 => 293309)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2022-04-25 04:45:02 UTC (rev 293309)
@@ -2591,7 +2591,7 @@
static RefPtr<Icon> iconForAttachment(const String& fileName, const String& attachmentType, const String& title)
{
if (!attachmentType.isEmpty()) {
- if (equalIgnoringASCIICase(attachmentType, "multipart/x-folder") || equalIgnoringASCIICase(attachmentType, "application/vnd.apple.folder")) {
+ if (equalLettersIgnoringASCIICase(attachmentType, "multipart/x-folder") || equalLettersIgnoringASCIICase(attachmentType, "application/vnd.apple.folder")) {
ALLOW_DEPRECATED_DECLARATIONS_BEGIN
auto type = kUTTypeFolder;
ALLOW_DEPRECATED_DECLARATIONS_END
Modified: trunk/Source/WebCore/svg/SVGAElement.cpp (293308 => 293309)
--- trunk/Source/WebCore/svg/SVGAElement.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/svg/SVGAElement.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -228,10 +228,10 @@
if (!m_relList) {
m_relList = makeUnique<DOMTokenList>(*this, SVGNames::relAttr, [](Document&, StringView token) {
#if USE(SYSTEM_PREVIEW)
- if (equalIgnoringASCIICase(token, "ar"))
+ if (equalLettersIgnoringASCIICase(token, "ar"))
return true;
#endif
- return equalIgnoringASCIICase(token, "noreferrer") || equalIgnoringASCIICase(token, "noopener");
+ return equalLettersIgnoringASCIICase(token, "noreferrer") || equalLettersIgnoringASCIICase(token, "noopener");
});
}
return *m_relList;
Modified: trunk/Source/WebCore/testing/MockCDMFactory.cpp (293308 => 293309)
--- trunk/Source/WebCore/testing/MockCDMFactory.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebCore/testing/MockCDMFactory.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -60,7 +60,7 @@
bool MockCDMFactory::supportsKeySystem(const String& keySystem)
{
- return equalIgnoringASCIICase(keySystem, "org.webkit.mock");
+ return equalLettersIgnoringASCIICase(keySystem, "org.webkit.mock");
}
void MockCDMFactory::addKeysToSessionWithID(const String& id, Vector<Ref<FragmentedSharedBuffer>>&& keys)
@@ -274,7 +274,7 @@
{
StringView certificateStringView(certificate->makeContiguous()->data(), certificate->size());
- callback(equalIgnoringASCIICase(certificateStringView, "valid") ? Succeeded : Failed);
+ callback(equalLettersIgnoringASCIICase(certificateStringView, "valid") ? Succeeded : Failed);
}
void MockCDMInstance::setStorageDirectory(const String&)
Modified: trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp (293308 => 293309)
--- trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -1345,7 +1345,7 @@
if (session) {
session->networkLoadScheduler().finishedPreconnectForMainResource(url, userAgent, error);
#if ENABLE(ADDITIONAL_PRECONNECT_ON_HTTP_1X)
- if (equalIgnoringASCIICase(metrics.protocol, "http/1.1")) {
+ if (equalLettersIgnoringASCIICase(metrics.protocol, "http/1.1")) {
auto parameters = parametersForAdditionalPreconnect;
auto task = new PreconnectTask(*session, WTFMove(parameters), [](const WebCore::ResourceError& error, const WebCore::NetworkLoadMetrics& metrics) { });
task->start();
Modified: trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp (293308 => 293309)
--- trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2022-04-25 03:54:08 UTC (rev 293308)
+++ trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp 2022-04-25 04:45:02 UTC (rev 293309)
@@ -766,8 +766,8 @@
};
auto isMediaMIMEType = [] (const String& mimeType) {
- return mimeType.startsWithIgnoringASCIICase("audio/")
- || mimeType.startsWithIgnoringASCIICase("video/")
+ return startsWithLettersIgnoringASCIICase(mimeType, "audio/")
+ || startsWithLettersIgnoringASCIICase(mimeType, "video/")
|| equalLettersIgnoringASCIICase(mimeType, "application/octet-stream");
};