mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00: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:
parent
cfc241f61d
commit
579730d861
Notes:
github-actions[bot]
2025-05-21 12:46:04 +00:00
Author: https://github.com/shannonbooth
Commit: 579730d861
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4799
Reviewed-by: https://github.com/AtkinsSJ ✅
24 changed files with 78 additions and 87 deletions
|
@ -778,7 +778,7 @@ void ConnectionFromClient::replace_dom_node_attribute(u64 page_id, Web::UniqueNo
|
|||
bool should_remove_attribute = true;
|
||||
|
||||
for (auto const& attribute : replacement_attributes) {
|
||||
if (should_remove_attribute && Web::Infra::is_ascii_case_insensitive_match(name, attribute.name))
|
||||
if (should_remove_attribute && name.equals_ignoring_ascii_case(attribute.name))
|
||||
should_remove_attribute = false;
|
||||
|
||||
// NOTE: We ignore invalid attributes for now, but we may want to send feedback to the user that this failed.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue