LibWeb: Prefer using equals_ignoring_ascii_case

Which has an optmization if both size of the string being passed
through are FlyStrings, which actually ends up being the case
in some places during selector matching comparing attribute names.
Instead of maintaining more overloads of
Infra::is_ascii_case_insensitive_match, switch
everything over to equals_ignoring_ascii_case instead.
This commit is contained in:
Shannon Booth 2025-05-18 15:04:56 +12:00 committed by Sam Atkins
parent cfc241f61d
commit 579730d861
Notes: github-actions[bot] 2025-05-21 12:46:04 +00:00
24 changed files with 78 additions and 87 deletions

View file

@ -999,7 +999,7 @@ TokenizedFeature::NoOpener HTMLElement::get_an_elements_noopener(URL::URL const&
// 2. If element's link types do not include the opener keyword and
// target is an ASCII case-insensitive match for "_blank", then return true.
if (!link_types.contains_slow("opener"sv) && Infra::is_ascii_case_insensitive_match(target, "_blank"sv))
if (!link_types.contains_slow("opener"sv) && target.equals_ignoring_ascii_case("_blank"sv))
return TokenizedFeature::NoOpener::Yes;
// 3. If url's blob URL entry is not null: