Changeset 293309 in webkit
- Timestamp:
- Apr 24, 2022, 9:45:02 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 43 edited
-
WebCore/Modules/applepay/PaymentCoordinator.cpp (modified) (1 diff)
-
WebCore/Modules/fetch/FetchBodyConsumer.cpp (modified) (2 diffs)
-
WebCore/css/PropertySetCSSStyleDeclaration.cpp (modified) (1 diff)
-
WebCore/css/parser/CSSAtRuleID.cpp (modified) (1 diff)
-
WebCore/css/parser/CSSParserImpl.cpp (modified) (5 diffs)
-
WebCore/css/parser/CSSPropertyParser.cpp (modified) (1 diff)
-
WebCore/css/parser/CSSSelectorParser.cpp (modified) (3 diffs)
-
WebCore/css/parser/CSSSupportsParser.cpp (modified) (2 diffs)
-
WebCore/css/parser/CSSTokenizer.cpp (modified) (1 diff)
-
WebCore/css/parser/MediaQueryParser.cpp (modified) (4 diffs)
-
WebCore/css/parser/SizesCalcParser.cpp (modified) (1 diff)
-
WebCore/css/typedom/transform/CSSPerspective.cpp (modified) (1 diff)
-
WebCore/editing/cocoa/DataDetection.mm (modified) (5 diffs)
-
WebCore/html/Autofill.cpp (modified) (1 diff)
-
WebCore/html/EnterKeyHint.cpp (modified) (1 diff)
-
WebCore/html/EnterKeyHint.h (modified) (1 diff)
-
WebCore/html/HTMLAnchorElement.cpp (modified) (1 diff)
-
WebCore/html/HTMLFormElement.cpp (modified) (2 diffs)
-
WebCore/html/HTMLImageElement.cpp (modified) (1 diff)
-
WebCore/html/InputType.cpp (modified) (1 diff)
-
WebCore/html/LinkRelAttribute.cpp (modified) (1 diff)
-
WebCore/html/parser/HTMLParserIdioms.cpp (modified) (1 diff)
-
WebCore/loader/DocumentLoader.cpp (modified) (1 diff)
-
WebCore/loader/LinkLoader.cpp (modified) (1 diff)
-
WebCore/loader/ServerTiming.cpp (modified) (2 diffs)
-
WebCore/page/PageConsoleClient.cpp (modified) (1 diff)
-
WebCore/page/Quirks.cpp (modified) (3 diffs)
-
WebCore/page/SecurityOriginData.cpp (modified) (1 diff)
-
WebCore/page/csp/ContentSecurityPolicySourceList.cpp (modified) (2 diffs)
-
WebCore/platform/graphics/FontGenericFamilies.cpp (modified) (1 diff)
-
WebCore/platform/graphics/MIMETypeCache.cpp (modified) (1 diff)
-
WebCore/platform/graphics/MediaPlayer.cpp (modified) (1 diff)
-
WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (modified) (3 diffs)
-
WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp (modified) (1 diff)
-
WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp (modified) (1 diff)
-
WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp (modified) (2 diffs)
-
WebCore/platform/network/curl/CookieUtil.cpp (modified) (4 diffs)
-
WebCore/platform/network/curl/CurlMultipartHandle.cpp (modified) (1 diff)
-
WebCore/rendering/RenderThemeMac.mm (modified) (1 diff)
-
WebCore/svg/SVGAElement.cpp (modified) (1 diff)
-
WebCore/testing/MockCDMFactory.cpp (modified) (2 diffs)
-
WebKit/NetworkProcess/NetworkProcess.cpp (modified) (1 diff)
-
WebKit/NetworkProcess/NetworkResourceLoader.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/Modules/applepay/PaymentCoordinator.cpp
r290329 r293309 266 266 std::optional<String> PaymentCoordinator::validatedPaymentNetwork(Document&, unsigned version, const String& paymentNetwork) const 267 267 { 268 if (version < 2 && equal IgnoringASCIICase(paymentNetwork, "jcb"))268 if (version < 2 && equalLettersIgnoringASCIICase(paymentNetwork, "jcb")) 269 269 return std::nullopt; 270 270 -
trunk/Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp
r292939 r293309 176 176 if (!mimeType) 177 177 return std::nullopt; 178 if (equal IgnoringASCIICase(mimeType->type, "multipart") && equalIgnoringASCIICase(mimeType->subtype, "form-data")) {178 if (equalLettersIgnoringASCIICase(mimeType->type, "multipart") && equalLettersIgnoringASCIICase(mimeType->subtype, "form-data")) { 179 179 auto iterator = mimeType->parameters.find<HashTranslatorASCIILiteral>("boundary"_s); 180 180 if (iterator != mimeType->parameters.end()) … … 202 202 nextBoundary = static_cast<const uint8_t*>(memmem(nextBoundary + boundaryLength, length - (nextBoundary + boundaryLength - data), boundary.data(), boundaryLength)); 203 203 } 204 } else if (mimeType && equal IgnoringASCIICase(mimeType->type, "application") && equalIgnoringASCIICase(mimeType->subtype, "x-www-form-urlencoded")) {204 } else if (mimeType && equalLettersIgnoringASCIICase(mimeType->type, "application") && equalLettersIgnoringASCIICase(mimeType->subtype, "x-www-form-urlencoded")) { 205 205 auto dataString = String::fromUTF8(data, length); 206 206 for (auto& pair : WTF::URLParser::parseURLEncodedForm(dataString)) -
trunk/Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
r292636 r293309 243 243 return { }; 244 244 245 bool important = equal IgnoringASCIICase(priority, "important");245 bool important = equalLettersIgnoringASCIICase(priority, "important"); 246 246 if (!important && !priority.isEmpty()) 247 247 return { }; -
trunk/Source/WebCore/css/parser/CSSAtRuleID.cpp
r286845 r293309 31 31 #include "CSSAtRuleID.h" 32 32 33 #include <wtf/SortedArrayMap.h> 34 33 35 namespace WebCore { 34 36 35 37 CSSAtRuleID cssAtRuleID(StringView name) 36 38 { 37 if (equalIgnoringASCIICase(name, "charset")) 38 return CSSAtRuleCharset; 39 if (equalIgnoringASCIICase(name, "font-face")) 40 return CSSAtRuleFontFace; 41 if (equalIgnoringASCIICase(name, "font-palette-values")) 42 return CSSAtRuleFontPaletteValues; 43 if (equalIgnoringASCIICase(name, "import")) 44 return CSSAtRuleImport; 45 if (equalIgnoringASCIICase(name, "keyframes")) 46 return CSSAtRuleKeyframes; 47 if (equalIgnoringASCIICase(name, "media")) 48 return CSSAtRuleMedia; 49 if (equalIgnoringASCIICase(name, "namespace")) 50 return CSSAtRuleNamespace; 51 if (equalIgnoringASCIICase(name, "page")) 52 return CSSAtRulePage; 53 if (equalIgnoringASCIICase(name, "supports")) 54 return CSSAtRuleSupports; 55 if (equalIgnoringASCIICase(name, "viewport")) 56 return CSSAtRuleViewport; 57 if (equalIgnoringASCIICase(name, "-webkit-keyframes")) 58 return CSSAtRuleWebkitKeyframes; 59 if (equalIgnoringASCIICase(name, "counter-style")) 60 return CSSAtRuleCounterStyle; 61 if (equalIgnoringASCIICase(name, "layer")) 62 return CSSAtRuleLayer; 63 if (equalIgnoringASCIICase(name, "container")) 64 return CSSAtRuleContainer; 65 return CSSAtRuleInvalid; 39 static constexpr std::pair<ComparableLettersLiteral, CSSAtRuleID> mappings[] = { 40 { "-webkit-keyframes", CSSAtRuleWebkitKeyframes }, 41 { "charset", CSSAtRuleCharset }, 42 { "container", CSSAtRuleContainer }, 43 { "counter-style", CSSAtRuleCounterStyle }, 44 { "font-face", CSSAtRuleFontFace }, 45 { "font-palette-values", CSSAtRuleFontPaletteValues }, 46 { "import", CSSAtRuleImport }, 47 { "keyframes", CSSAtRuleKeyframes }, 48 { "layer", CSSAtRuleLayer }, 49 { "media", CSSAtRuleMedia }, 50 { "namespace", CSSAtRuleNamespace }, 51 { "page", CSSAtRulePage }, 52 { "supports", CSSAtRuleSupports }, 53 { "viewport", CSSAtRuleViewport }, 54 }; 55 static constexpr SortedArrayMap cssAtRules { mappings }; 56 return cssAtRules.get(name, CSSAtRuleInvalid); 66 57 } 67 58 -
trunk/Source/WebCore/css/parser/CSSParserImpl.cpp
r292636 r293309 487 487 return range.consumeIncludingWhitespace().value().toAtomString(); 488 488 489 if (token.type() != FunctionToken || !equal IgnoringASCIICase(token.value(), "url"))489 if (token.type() != FunctionToken || !equalLettersIgnoringASCIICase(token.value(), "url")) 490 490 return AtomString(); 491 491 … … 552 552 553 553 auto& token = prelude.peek(); 554 if (token.type() == FunctionToken && equal IgnoringASCIICase(token.value(), "layer")) {554 if (token.type() == FunctionToken && equalLettersIgnoringASCIICase(token.value(), "layer")) { 555 555 auto savedPreludeForFailure = prelude; 556 556 auto contents = CSSPropertyParserHelpers::consumeFunction(prelude); … … 562 562 return layerName; 563 563 } 564 if (token.type() == IdentToken && equal IgnoringASCIICase(token.value(), "layer")) {564 if (token.type() == IdentToken && equalLettersIgnoringASCIICase(token.value(), "layer")) { 565 565 prelude.consumeIncludingWhitespace(); 566 566 return CascadeLayerName { }; … … 1015 1015 removeTrailingWhitespace(range, end); 1016 1016 declarationValueEnd = end; 1017 if (end[-1].type() == IdentToken && equal IgnoringASCIICase(end[-1].value(), "important")) {1017 if (end[-1].type() == IdentToken && equalLettersIgnoringASCIICase(end[-1].value(), "important")) { 1018 1018 --end; 1019 1019 removeTrailingWhitespace(range, end); … … 1071 1071 if (token.type() == PercentageToken && token.numericValue() >= 0 && token.numericValue() <= 100) 1072 1072 result.append(token.numericValue() / 100); 1073 else if (token.type() == IdentToken && equal IgnoringASCIICase(token.value(), "from"))1073 else if (token.type() == IdentToken && equalLettersIgnoringASCIICase(token.value(), "from")) 1074 1074 result.append(0); 1075 else if (token.type() == IdentToken && equal IgnoringASCIICase(token.value(), "to"))1075 else if (token.type() == IdentToken && equalLettersIgnoringASCIICase(token.value(), "to")) 1076 1076 result.append(1); 1077 1077 else -
trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp
r293090 r293309 1375 1375 if (range.peek().type() == StringToken) { 1376 1376 const CSSParserToken& token = range.consumeIncludingWhitespace(); 1377 if (equal IgnoringASCIICase(token.value(), "none"))1377 if (equalLettersIgnoringASCIICase(token.value(), "none")) 1378 1378 return CSSValuePool::singleton().createIdentifierValue(CSSValueNone); 1379 1379 return CSSValuePool::singleton().createValue(token.value().toString(), CSSUnitType::CSS_STRING); -
trunk/Source/WebCore/css/parser/CSSSelectorParser.cpp
r292939 r293309 710 710 return nullptr; 711 711 const CSSParserToken& ident = block.consume(); 712 if (!equal IgnoringASCIICase(ident.value(), "of"))712 if (!equalLettersIgnoringASCIICase(ident.value(), "of")) 713 713 return nullptr; 714 714 if (block.peek().type() != WhitespaceToken) … … 884 884 return CSSSelector::CaseSensitive; 885 885 const CSSParserToken& flag = range.consumeIncludingWhitespace(); 886 if (equal IgnoringASCIICase(flag.value(), "i"))886 if (equalLettersIgnoringASCIICase(flag.value(), "i")) 887 887 return CSSSelector::CaseInsensitive; 888 888 m_failedParsing = true; … … 921 921 } 922 922 if (token.type() == IdentToken) { 923 if (equal IgnoringASCIICase(token.value(), "odd")) {923 if (equalLettersIgnoringASCIICase(token.value(), "odd")) { 924 924 result = std::make_pair(2, 1); 925 925 return true; 926 926 } 927 if (equal IgnoringASCIICase(token.value(), "even")) {927 if (equalLettersIgnoringASCIICase(token.value(), "even")) { 928 928 result = std::make_pair(2, 0); 929 929 return true; -
trunk/Source/WebCore/css/parser/CSSSupportsParser.cpp
r267143 r293309 58 58 { 59 59 if (range.peek().type() == IdentToken || range.peek().type() == FunctionToken) { 60 if (equal IgnoringASCIICase(range.peek().value(), "not"))60 if (equalLettersIgnoringASCIICase(range.peek().value(), "not")) 61 61 return consumeNegation(range); 62 62 } … … 93 93 if (clauseType == Unresolved) 94 94 clauseType = token.value().length() == 3 ? Conjunction : Disjunction; 95 if ((clauseType == Conjunction && !equal IgnoringASCIICase(token.value(), "and"))96 || (clauseType == Disjunction && !equal IgnoringASCIICase(token.value(), "or")))95 if ((clauseType == Conjunction && !equalLettersIgnoringASCIICase(token.value(), "and")) 96 || (clauseType == Disjunction && !equalLettersIgnoringASCIICase(token.value(), "or"))) 97 97 return Invalid; 98 98 -
trunk/Source/WebCore/css/parser/CSSTokenizer.cpp
r289493 r293309 596 596 StringView name = consumeName(); 597 597 if (consumeIfNext('(')) { 598 if (equal IgnoringASCIICase(name, "url")) {598 if (equalLettersIgnoringASCIICase(name, "url")) { 599 599 // The spec is slightly different so as to avoid dropping whitespace 600 600 // tokens, but they wouldn't be used and this is easier. -
trunk/Source/WebCore/css/parser/MediaQueryParser.cpp
r291863 r293309 114 114 void MediaQueryParser::readMediaNot(CSSParserTokenType type, const CSSParserToken& token, CSSParserTokenRange& range) 115 115 { 116 if (type == IdentToken && equal IgnoringASCIICase(token.value(), "not"))116 if (type == IdentToken && equalLettersIgnoringASCIICase(token.value(), "not")) 117 117 setStateAndRestrict(ReadFeatureStart, MediaQuery::Not); 118 118 else … … 129 129 { 130 130 // FIXME: it would be more efficient to use lower-case always for tokenValue. 131 return equal IgnoringASCIICase(token.value(), "not")132 || equal IgnoringASCIICase(token.value(), "and")133 || equal IgnoringASCIICase(token.value(), "or")134 || equal IgnoringASCIICase(token.value(), "only");131 return equalLettersIgnoringASCIICase(token.value(), "not") 132 || equalLettersIgnoringASCIICase(token.value(), "and") 133 || equalLettersIgnoringASCIICase(token.value(), "or") 134 || equalLettersIgnoringASCIICase(token.value(), "only"); 135 135 } 136 136 … … 143 143 m_state = ReadFeature; 144 144 } else if (type == IdentToken) { 145 if (m_state == ReadRestrictor && equal IgnoringASCIICase(token.value(), "not"))145 if (m_state == ReadRestrictor && equalLettersIgnoringASCIICase(token.value(), "not")) 146 146 setStateAndRestrict(ReadMediaType, MediaQuery::Not); 147 else if (m_state == ReadRestrictor && equal IgnoringASCIICase(token.value(), "only"))147 else if (m_state == ReadRestrictor && equalLettersIgnoringASCIICase(token.value(), "only")) 148 148 setStateAndRestrict(ReadMediaType, MediaQuery::Only); 149 149 else if (m_mediaQueryData.restrictor() != MediaQuery::None … … 175 175 void MediaQueryParser::readAnd(CSSParserTokenType type, const CSSParserToken& token, CSSParserTokenRange& /*range*/) 176 176 { 177 if (type == IdentToken && equal IgnoringASCIICase(token.value(), "and")) {177 if (type == IdentToken && equalLettersIgnoringASCIICase(token.value(), "and")) { 178 178 m_state = ReadFeatureStart; 179 179 } else if (type == CommaToken && m_parserType != MediaConditionParser) { -
trunk/Source/WebCore/css/parser/SizesCalcParser.cpp
r279498 r293309 131 131 break; 132 132 case FunctionToken: 133 if (!equal IgnoringASCIICase(token.value(), "calc"))133 if (!equalLettersIgnoringASCIICase(token.value(), "calc")) 134 134 return false; 135 135 // "calc(" is the same as "(" -
trunk/Source/WebCore/css/typedom/transform/CSSPerspective.cpp
r293052 r293309 48 48 auto checkKeywordValue = [] (RefPtr<CSSKeywordValue> value) -> ExceptionOr<CSSPerspectiveValue> { 49 49 RELEASE_ASSERT(value); 50 if (!equal IgnoringASCIICase(value->value(), "none"))50 if (!equalLettersIgnoringASCIICase(value->value(), "none")) 51 51 return Exception { TypeError }; 52 52 return { WTFMove(value) }; -
trunk/Source/WebCore/editing/cocoa/DataDetection.mm
r293292 r293309 185 185 bool DataDetection::requiresExtendedContext(Element& element) 186 186 { 187 return equal IgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectors_typeAttr), "calendar-event");187 return equalLettersIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectors_typeAttr), "calendar-event"); 188 188 } 189 189 … … 277 277 return; 278 278 279 bool elementIsDDAnchor = is<HTMLAnchorElement>(element) && equal IgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true");279 bool elementIsDDAnchor = is<HTMLAnchorElement>(element) && equalLettersIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true"); 280 280 if (!elementIsDDAnchor) 281 281 return; … … 293 293 if (is<HTMLAnchorElement>(*node)) { 294 294 auto& anchor = downcast<HTMLAnchorElement>(*node); 295 if (!equal IgnoringASCIICase(anchor.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true"))295 if (!equalLettersIgnoringASCIICase(anchor.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true")) 296 296 return true; 297 297 removeResultLinksFromAnchor(anchor); … … 302 302 // The only ancestors not tested at this point are in the direct line from self's parent to the top. 303 303 for (auto& anchor : ancestorsOfType<HTMLAnchorElement>(startNode)) { 304 if (!equal IgnoringASCIICase(anchor.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true"))304 if (!equalLettersIgnoringASCIICase(anchor.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true")) 305 305 return true; 306 306 removeResultLinksFromAnchor(anchor); … … 690 690 bool DataDetection::isDataDetectorElement(const Element& element) 691 691 { 692 return is<HTMLAnchorElement>(element) && equal IgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true");692 return is<HTMLAnchorElement>(element) && equalLettersIgnoringASCIICase(element.attributeWithoutSynchronization(x_apple_data_detectorsAttr), "true"); 693 693 } 694 694 -
trunk/Source/WebCore/html/Autofill.cpp
r293285 r293309 248 248 // in the following list, then run the substeps that follow: 249 249 const auto& modeToken = tokens[index]; 250 if (equal IgnoringASCIICase(modeToken, "shipping") || equalIgnoringASCIICase(modeToken, "billing")) {250 if (equalLettersIgnoringASCIICase(modeToken, "shipping") || equalLettersIgnoringASCIICase(modeToken, "billing")) { 251 251 // 1. Let mode be the matching string from the list above. 252 252 const auto& mode = modeToken; -
trunk/Source/WebCore/html/EnterKeyHint.cpp
r293285 r293309 28 28 29 29 #include "CommonAtomStrings.h" 30 #include <wtf/SortedArrayMap.h> 30 31 31 32 namespace WebCore { 32 33 33 EnterKeyHint enterKeyHintForAttributeValue( const String&value)34 EnterKeyHint enterKeyHintForAttributeValue(StringView value) 34 35 { 35 if (equalIgnoringASCIICase(value, "enter")) 36 return EnterKeyHint::Enter; 37 if (equalIgnoringASCIICase(value, "done")) 38 return EnterKeyHint::Done; 39 if (equalIgnoringASCIICase(value, "go")) 40 return EnterKeyHint::Go; 41 if (equalIgnoringASCIICase(value, "next")) 42 return EnterKeyHint::Next; 43 if (equalIgnoringASCIICase(value, "previous")) 44 return EnterKeyHint::Previous; 45 if (equalIgnoringASCIICase(value, "search")) 46 return EnterKeyHint::Search; 47 if (equalIgnoringASCIICase(value, "send")) 48 return EnterKeyHint::Send; 49 return EnterKeyHint::Unspecified; 36 static constexpr std::pair<ComparableLettersLiteral, EnterKeyHint> mappings[] = { 37 { "done", EnterKeyHint::Done }, 38 { "enter", EnterKeyHint::Enter }, 39 { "go", EnterKeyHint::Go }, 40 { "next", EnterKeyHint::Next }, 41 { "previous", EnterKeyHint::Previous }, 42 { "search", EnterKeyHint::Search }, 43 { "send", EnterKeyHint::Send } 44 }; 45 static constexpr SortedArrayMap enterKeyHints { mappings }; 46 return enterKeyHints.get(value, EnterKeyHint::Unspecified); 50 47 } 51 48 -
trunk/Source/WebCore/html/EnterKeyHint.h
r262933 r293309 42 42 }; 43 43 44 EnterKeyHint enterKeyHintForAttributeValue( const String&);44 EnterKeyHint enterKeyHintForAttributeValue(StringView); 45 45 String attributeValueForEnterKeyHint(EnterKeyHint); 46 46 -
trunk/Source/WebCore/html/HTMLAnchorElement.cpp
r293059 r293309 316 316 m_relList = makeUnique<DOMTokenList>(*this, HTMLNames::relAttr, [](Document& document, StringView token) { 317 317 #if USE(SYSTEM_PREVIEW) 318 if (equal IgnoringASCIICase(token, "ar"))318 if (equalLettersIgnoringASCIICase(token, "ar")) 319 319 return document.settings().systemPreviewEnabled(); 320 320 #else 321 321 UNUSED_PARAM(document); 322 322 #endif 323 return equal IgnoringASCIICase(token, "noreferrer") || equalIgnoringASCIICase(token, "noopener") || equalIgnoringASCIICase(token, "opener");323 return equalLettersIgnoringASCIICase(token, "noreferrer") || equalLettersIgnoringASCIICase(token, "noopener") || equalLettersIgnoringASCIICase(token, "opener"); 324 324 }); 325 325 } -
trunk/Source/WebCore/html/HTMLFormElement.cpp
r293285 r293309 82 82 FormRelAttributes attributes; 83 83 for (auto token : string.split(' ')) { 84 if (equal IgnoringASCIICase(token, "noopener"))84 if (equalLettersIgnoringASCIICase(token, "noopener")) 85 85 attributes.noopener = true; 86 else if (equal IgnoringASCIICase(token, "noreferrer"))86 else if (equalLettersIgnoringASCIICase(token, "noreferrer")) 87 87 attributes.noreferrer = true; 88 else if (equal IgnoringASCIICase(token, "opener"))88 else if (equalLettersIgnoringASCIICase(token, "opener")) 89 89 attributes.opener = true; 90 90 } … … 758 758 if (!m_relList) { 759 759 m_relList = makeUnique<DOMTokenList>(*this, HTMLNames::relAttr, [](Document&, StringView token) { 760 return equal IgnoringASCIICase(token, "noreferrer") || equalIgnoringASCIICase(token, "noopener") || equalIgnoringASCIICase(token, "opener");760 return equalLettersIgnoringASCIICase(token, "noreferrer") || equalLettersIgnoringASCIICase(token, "noopener") || equalLettersIgnoringASCIICase(token, "opener"); 761 761 }); 762 762 } -
trunk/Source/WebCore/html/HTMLImageElement.cpp
r293285 r293309 290 290 if (crossoriginValue.isNull()) 291 291 return NotSet; 292 return equal IgnoringASCIICase(crossoriginValue, "use-credentials") ? UseCredentials : Anonymous;292 return equalLettersIgnoringASCIICase(crossoriginValue, "use-credentials") ? UseCredentials : Anonymous; 293 293 } 294 294 -
trunk/Source/WebCore/html/InputType.cpp
r293195 r293309 955 955 newValue = newValue + stepRange.step() * Decimal::fromDouble(count); 956 956 const AtomString& stepString = element()->getAttribute(HTMLNames::stepAttr); 957 if (!equal IgnoringASCIICase(stepString, "any"))957 if (!equalLettersIgnoringASCIICase(stepString, "any")) 958 958 newValue = stepRange.alignValueForStep(current, newValue); 959 959 -
trunk/Source/WebCore/html/LinkRelAttribute.cpp
r266360 r293309 117 117 } 118 118 119 if (document.settings().linkPreconnectEnabled() && equal IgnoringASCIICase(attribute, "preconnect"))119 if (document.settings().linkPreconnectEnabled() && equalLettersIgnoringASCIICase(attribute, "preconnect")) 120 120 return true; 121 121 122 if (document.settings().linkPreloadEnabled() && equal IgnoringASCIICase(attribute, "preload"))122 if (document.settings().linkPreloadEnabled() && equalLettersIgnoringASCIICase(attribute, "preload")) 123 123 return true; 124 124 125 if (document.settings().linkPrefetchEnabled() && equal IgnoringASCIICase(attribute, "prefetch"))125 if (document.settings().linkPrefetchEnabled() && equalLettersIgnoringASCIICase(attribute, "prefetch")) 126 126 return true; 127 127 -
trunk/Source/WebCore/html/parser/HTMLParserIdioms.cpp
r292951 r293309 358 358 if (value.isNull()) 359 359 return String(); 360 if (equal IgnoringASCIICase(value, "use-credentials"))360 if (equalLettersIgnoringASCIICase(value, "use-credentials")) 361 361 return "use-credentials"_s; 362 362 return "anonymous"_s; -
trunk/Source/WebCore/loader/DocumentLoader.cpp
r293195 r293309 1551 1551 1552 1552 manifestURL = href; 1553 useCredentials = equal IgnoringASCIICase(link.attributeWithoutSynchronization(HTMLNames::crossoriginAttr), "use-credentials");1553 useCredentials = equalLettersIgnoringASCIICase(link.attributeWithoutSynchronization(HTMLNames::crossoriginAttr), "use-credentials"); 1554 1554 break; 1555 1555 } -
trunk/Source/WebCore/loader/LinkLoader.cpp
r292810 r293309 215 215 ASSERT(document.settings().linkPreconnectEnabled()); 216 216 StoredCredentialsPolicy storageCredentialsPolicy = StoredCredentialsPolicy::Use; 217 if (equal IgnoringASCIICase(params.crossOrigin, "anonymous") && document.securityOrigin().isSameOriginDomain(SecurityOrigin::create(href)))217 if (equalLettersIgnoringASCIICase(params.crossOrigin, "anonymous") && document.securityOrigin().isSameOriginDomain(SecurityOrigin::create(href))) 218 218 storageCredentialsPolicy = StoredCredentialsPolicy::DoNotUse; 219 219 ASSERT(document.frame()->loader().networkingContext()); -
trunk/Source/WebCore/loader/ServerTiming.cpp
r290901 r293309 31 31 void ServerTiming::setParameter(const String& name, const String& value) 32 32 { 33 if (equal IgnoringASCIICase(name, "dur")) {33 if (equalLettersIgnoringASCIICase(name, "dur")) { 34 34 if (!durationSet) { 35 35 duration = value.toDouble(); … … 38 38 return; 39 39 } 40 if (equal IgnoringASCIICase(name, "desc")) {40 if (equalLettersIgnoringASCIICase(name, "desc")) { 41 41 if (!descriptionSet) { 42 42 description = value; -
trunk/Source/WebCore/page/PageConsoleClient.cpp
r292469 r293309 416 416 } else { 417 417 String base64; 418 if (possibleTarget.getString(lexicalGlobalObject, base64) && base64.startsWithIgnoringASCIICase("data:") && base64.length() > 5) {418 if (possibleTarget.getString(lexicalGlobalObject, base64) && startsWithLettersIgnoringASCIICase(base64, "data:") && base64.length() > 5) { 419 419 target = possibleTarget; 420 420 dataURL = base64; -
trunk/Source/WebCore/page/Quirks.cpp
r292810 r293309 364 364 { 365 365 auto& url = m_document->topDocument().url(); 366 return topPrivatelyControlledDomain(url.host().toString()).startsWith("google.") && url.path().startsWithIgnoringASCIICase("/maps/");366 return topPrivatelyControlledDomain(url.host().toString()).startsWith("google.") && startsWithLettersIgnoringASCIICase(url.path(), "/maps/"); 367 367 } 368 368 … … 390 390 if (host == "wix.com" || host.endsWith(".wix.com")) { 391 391 // Disable simulated mouse dispatching for template selection. 392 return url.path().startsWithIgnoringASCIICase("/website/templates/") ? ShouldDispatchSimulatedMouseEvents::No : ShouldDispatchSimulatedMouseEvents::Yes;392 return startsWithLettersIgnoringASCIICase(url.path(), "/website/templates/") ? ShouldDispatchSimulatedMouseEvents::No : ShouldDispatchSimulatedMouseEvents::Yes; 393 393 } 394 394 395 if ((host == "desmos.com" || host.endsWith(".desmos.com")) && url.path().startsWithIgnoringASCIICase("/calculator/"))395 if ((host == "desmos.com" || host.endsWith(".desmos.com")) && startsWithLettersIgnoringASCIICase(url.path(), "/calculator/")) 396 396 return ShouldDispatchSimulatedMouseEvents::Yes; 397 397 if (host == "figma.com" || host.endsWith(".figma.com")) … … 616 616 617 617 auto& url = m_document->topDocument().url(); 618 return equalLettersIgnoringASCIICase(url.host(), "docs.google.com") && url.path().startsWithIgnoringASCIICase("/spreadsheets/");618 return equalLettersIgnoringASCIICase(url.host(), "docs.google.com") && startsWithLettersIgnoringASCIICase(url.path(), "/spreadsheets/"); 619 619 #else 620 620 return false; -
trunk/Source/WebCore/page/SecurityOriginData.cpp
r292857 r293309 81 81 // Now that we've fixed that bug, we produce this string for compatibility 82 82 // with existing persistent state. 83 if (equal IgnoringASCIICase(protocol, "file"))83 if (equalLettersIgnoringASCIICase(protocol, "file")) 84 84 return "file__0"_s; 85 85 -
trunk/Source/WebCore/page/csp/ContentSecurityPolicySourceList.cpp
r292477 r293309 182 182 static bool schemeIsInHttpFamily(StringView scheme) 183 183 { 184 return equal IgnoringASCIICase(scheme, "https") || equalIgnoringASCIICase(scheme, "http");184 return equalLettersIgnoringASCIICase(scheme, "https") || equalLettersIgnoringASCIICase(scheme, "http"); 185 185 } 186 186 … … 220 220 return false; 221 221 222 if (equal IgnoringASCIICase(parsedSource.scheme, "blob"))222 if (equalLettersIgnoringASCIICase(parsedSource.scheme, "blob")) 223 223 return true; 224 224 225 if (!equal IgnoringASCIICase(parsedSource.scheme, "https") || parsedSource.host.value.isEmpty())225 if (!equalLettersIgnoringASCIICase(parsedSource.scheme, "https") || parsedSource.host.value.isEmpty()) 226 226 return false; 227 227 break; -
trunk/Source/WebCore/platform/graphics/FontGenericFamilies.cpp
r290901 r293309 49 49 const Vector<String>& preferredLanguages = userPreferredLanguages(); 50 50 for (auto& language : preferredLanguages) { 51 if (equal IgnoringASCIICase(language, "zh-tw"))51 if (equalLettersIgnoringASCIICase(language, "zh-tw")) 52 52 return false; 53 if (equal IgnoringASCIICase(language, "zh-cn"))53 if (equalLettersIgnoringASCIICase(language, "zh-cn")) 54 54 return true; 55 55 } -
trunk/Source/WebCore/platform/graphics/MIMETypeCache.cpp
r276880 r293309 139 139 // Some sites (e.g. Modernizr) use 'audio/mpeg; codecs="mp3"' even though 140 140 // it is not RFC 3003 compliant. 141 if (equal IgnoringASCIICase(type.containerType(), "audio/mpeg")) {141 if (equalLettersIgnoringASCIICase(type.containerType(), "audio/mpeg")) { 142 142 auto codecs = type.codecs(); 143 143 return codecs.size() == 1 && codecs[0] == "mp3"; -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r293285 r293309 1108 1108 return SupportsType::IsNotSupported; 1109 1109 1110 if (! containerType.startsWithIgnoringASCIICase("video/") && !containerType.startsWithIgnoringASCIICase("audio/") && !containerType.startsWithIgnoringASCIICase("application/"))1110 if (!startsWithLettersIgnoringASCIICase(containerType.string(), "video/") && !startsWithLettersIgnoringASCIICase(containerType.string(), "audio/") && !startsWithLettersIgnoringASCIICase(containerType.string(), "application/")) 1111 1111 return SupportsType::IsNotSupported; 1112 1112 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r292810 r293309 809 809 return false; 810 810 811 return equal IgnoringASCIICase(type, "video/webm") || equalIgnoringASCIICase(type, "audio/webm");811 return equalLettersIgnoringASCIICase(type, "video/webm") || equalLettersIgnoringASCIICase(type, "audio/webm"); 812 812 #else 813 813 UNUSED_PARAM(type); … … 2019 2019 static bool keySystemIsSupported(const String& keySystem) 2020 2020 { 2021 if (equalIgnoringASCIICase(keySystem, "com.apple.fps") || equalIgnoringASCIICase(keySystem, "com.apple.fps.1_0") || equalIgnoringASCIICase(keySystem, "org.w3c.clearkey"))2022 return true;2023 return false;2021 return equalLettersIgnoringASCIICase(keySystem, "com.apple.fps") 2022 || equalIgnoringASCIICase(keySystem, "com.apple.fps.1_0") 2023 || equalLettersIgnoringASCIICase(keySystem, "org.w3c.clearkey"); 2024 2024 } 2025 2025 #endif … … 2054 2054 if (!keySystem.isEmpty()) { 2055 2055 // "Clear Key" is only supported with HLS: 2056 if (equal IgnoringASCIICase(keySystem, "org.w3c.clearkey") && !mimeType.isEmpty() && !equalIgnoringASCIICase(mimeType, "application/x-mpegurl"))2056 if (equalLettersIgnoringASCIICase(keySystem, "org.w3c.clearkey") && !mimeType.isEmpty() && !equalLettersIgnoringASCIICase(mimeType, "application/x-mpegurl")) 2057 2057 return false; 2058 2058 -
trunk/Source/WebCore/platform/graphics/cocoa/SourceBufferParserWebM.cpp
r291216 r293309 1281 1281 1282 1282 auto containerType = type.containerType(); 1283 bool isAudioContainerType = equal IgnoringASCIICase(containerType, "audio/webm");1284 bool isVideoContainerType = equal IgnoringASCIICase(containerType, "video/webm");1283 bool isAudioContainerType = equalLettersIgnoringASCIICase(containerType, "audio/webm"); 1284 bool isVideoContainerType = equalLettersIgnoringASCIICase(containerType, "video/webm"); 1285 1285 if (!isAudioContainerType && !isVideoContainerType) 1286 1286 return MediaPlayerEnums::SupportsType::IsNotSupported; -
trunk/Source/WebCore/platform/graphics/gstreamer/DMABufVideoSinkGStreamer.cpp
r291343 r293309 168 168 [&] { 169 169 const char* value = g_getenv("WEBKIT_GST_DMABUF_SINK_ENABLED"); 170 s_enabled = value && (equal IgnoringASCIICase(value, "true") || equalIgnoringASCIICase(value, "1"));170 s_enabled = value && (equalLettersIgnoringASCIICase(value, "true") || equalLettersIgnoringASCIICase(value, "1")); 171 171 }); 172 172 return s_enabled; -
trunk/Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp
r292473 r293309 609 609 } 610 610 auto containerType = contentType.containerType(); 611 if (equal IgnoringASCIICase(containerType, "video/vp8")) {611 if (equalLettersIgnoringASCIICase(containerType, "video/vp8")) { 612 612 info.powerEfficient = false; 613 613 info.smooth = isVPSoftwareDecoderSmooth(*info.supportedConfiguration.video); 614 } else if (equal IgnoringASCIICase(containerType, "video/vp9")) {614 } else if (equalLettersIgnoringASCIICase(containerType, "video/vp9")) { 615 615 auto decodingInfo = computeVPParameters(*info.supportedConfiguration.video); 616 616 if (decodingInfo && !decodingInfo->supported && isSupportingVP9VTB()) { … … 660 660 #if PLATFORM(COCOA) 661 661 auto containerType = contentType.containerType(); 662 if (equal IgnoringASCIICase(containerType, "video/vp8") || equalIgnoringASCIICase(containerType, "video/vp9")) {662 if (equalLettersIgnoringASCIICase(containerType, "video/vp8") || equalLettersIgnoringASCIICase(containerType, "video/vp9")) { 663 663 info.powerEfficient = false; 664 664 // FIXME: Provide more granular VPX encoder smoothness. -
trunk/Source/WebCore/platform/network/curl/CookieUtil.cpp
r292857 r293309 103 103 attributeName = attribute.stripWhiteSpace(); 104 104 105 if (equal IgnoringASCIICase(attributeName, "httponly"))105 if (equalLettersIgnoringASCIICase(attributeName, "httponly")) 106 106 result.httpOnly = true; 107 else if (equal IgnoringASCIICase(attributeName, "secure"))107 else if (equalLettersIgnoringASCIICase(attributeName, "secure")) 108 108 result.secure = true; 109 else if (equal IgnoringASCIICase(attributeName, "domain")) {109 else if (equalLettersIgnoringASCIICase(attributeName, "domain")) { 110 110 if (attributeValue.isEmpty()) 111 111 return; … … 117 117 result.domain = attributeValue.convertToASCIILowercase(); 118 118 119 } else if (equal IgnoringASCIICase(attributeName, "max-age")) {119 } else if (equalLettersIgnoringASCIICase(attributeName, "max-age")) { 120 120 if (auto maxAgeSeconds = parseIntegerAllowingTrailingJunk<int64_t>(attributeValue)) { 121 121 result.expires = (WallTime::now().secondsSinceEpoch().value() + *maxAgeSeconds) * msPerSecond; … … 129 129 result.expires = std::nullopt; 130 130 } 131 } else if (equal IgnoringASCIICase(attributeName, "expires") && !hasMaxAge) {131 } else if (equalLettersIgnoringASCIICase(attributeName, "expires") && !hasMaxAge) { 132 132 if (auto expiryTime = parseExpiresMS(attributeValue.utf8().data())) { 133 133 result.expires = expiryTime.value(); … … 137 137 result.expires = std::nullopt; 138 138 } 139 } else if (equal IgnoringASCIICase(attributeName, "path")) {139 } else if (equalLettersIgnoringASCIICase(attributeName, "path")) { 140 140 if (!attributeValue.isEmpty() && attributeValue.startsWith('/')) 141 141 result.path = attributeValue; -
trunk/Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp
r291800 r293309 63 63 auto contentType = header.substring(splitPosition + 1).stripWhiteSpace(); 64 64 auto mimeType = extractMIMETypeFromMediaType(contentType); 65 if (!equal IgnoringASCIICase(mimeType, "multipart/x-mixed-replace"))65 if (!equalLettersIgnoringASCIICase(mimeType, "multipart/x-mixed-replace")) 66 66 continue; 67 67 -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r292268 r293309 2592 2592 { 2593 2593 if (!attachmentType.isEmpty()) { 2594 if (equal IgnoringASCIICase(attachmentType, "multipart/x-folder") || equalIgnoringASCIICase(attachmentType, "application/vnd.apple.folder")) {2594 if (equalLettersIgnoringASCIICase(attachmentType, "multipart/x-folder") || equalLettersIgnoringASCIICase(attachmentType, "application/vnd.apple.folder")) { 2595 2595 ALLOW_DEPRECATED_DECLARATIONS_BEGIN 2596 2596 auto type = kUTTypeFolder; -
trunk/Source/WebCore/svg/SVGAElement.cpp
r290326 r293309 229 229 m_relList = makeUnique<DOMTokenList>(*this, SVGNames::relAttr, [](Document&, StringView token) { 230 230 #if USE(SYSTEM_PREVIEW) 231 if (equal IgnoringASCIICase(token, "ar"))231 if (equalLettersIgnoringASCIICase(token, "ar")) 232 232 return true; 233 233 #endif 234 return equal IgnoringASCIICase(token, "noreferrer") || equalIgnoringASCIICase(token, "noopener");234 return equalLettersIgnoringASCIICase(token, "noreferrer") || equalLettersIgnoringASCIICase(token, "noopener"); 235 235 }); 236 236 } -
trunk/Source/WebCore/testing/MockCDMFactory.cpp
r290470 r293309 61 61 bool MockCDMFactory::supportsKeySystem(const String& keySystem) 62 62 { 63 return equal IgnoringASCIICase(keySystem, "org.webkit.mock");63 return equalLettersIgnoringASCIICase(keySystem, "org.webkit.mock"); 64 64 } 65 65 … … 275 275 StringView certificateStringView(certificate->makeContiguous()->data(), certificate->size()); 276 276 277 callback(equal IgnoringASCIICase(certificateStringView, "valid") ? Succeeded : Failed);277 callback(equalLettersIgnoringASCIICase(certificateStringView, "valid") ? Succeeded : Failed); 278 278 } 279 279 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r293296 r293309 1346 1346 session->networkLoadScheduler().finishedPreconnectForMainResource(url, userAgent, error); 1347 1347 #if ENABLE(ADDITIONAL_PRECONNECT_ON_HTTP_1X) 1348 if (equal IgnoringASCIICase(metrics.protocol, "http/1.1")) {1348 if (equalLettersIgnoringASCIICase(metrics.protocol, "http/1.1")) { 1349 1349 auto parameters = parametersForAdditionalPreconnect; 1350 1350 auto task = new PreconnectTask(*session, WTFMove(parameters), [](const WebCore::ResourceError& error, const WebCore::NetworkLoadMetrics& metrics) { }); -
trunk/Source/WebKit/NetworkProcess/NetworkResourceLoader.cpp
r293056 r293309 767 767 768 768 auto isMediaMIMEType = [] (const String& mimeType) { 769 return mimeType.startsWithIgnoringASCIICase("audio/")770 || mimeType.startsWithIgnoringASCIICase("video/")769 return startsWithLettersIgnoringASCIICase(mimeType, "audio/") 770 || startsWithLettersIgnoringASCIICase(mimeType, "video/") 771 771 || equalLettersIgnoringASCIICase(mimeType, "application/octet-stream"); 772 772 };
Note:
See TracChangeset
for help on using the changeset viewer.