mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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:
committed by
Sam Atkins
parent
cfc241f61d
commit
579730d861
Notes:
github-actions[bot]
2025-05-21 12:46:04 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/579730d8611 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4799 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -105,7 +105,7 @@ Optional<MediaFeatureID> media_feature_id_from_string(StringView string)
|
||||
member_generator.set("name", name);
|
||||
member_generator.set("name:titlecase", title_casify(name));
|
||||
member_generator.append(R"~~~(
|
||||
if (Infra::is_ascii_case_insensitive_match(string, "@name@"sv))
|
||||
if (string.equals_ignoring_ascii_case("@name@"sv))
|
||||
return MediaFeatureID::@name:titlecase@;
|
||||
)~~~");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user