mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-05 16:41:52 +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
|
@ -892,7 +892,7 @@ static WebIDL::ExceptionOr<String> serialize_processing_instruction(DOM::Process
|
|||
if (processing_instruction.target().contains(':'))
|
||||
return WebIDL::InvalidStateError::create(processing_instruction.realm(), "Processing instruction target contains a colon"_string);
|
||||
|
||||
if (Infra::is_ascii_case_insensitive_match(processing_instruction.target(), "xml"sv))
|
||||
if (processing_instruction.target().equals_ignoring_ascii_case("xml"sv))
|
||||
return WebIDL::InvalidStateError::create(processing_instruction.realm(), "Processing instruction target is equal to 'xml'"_string);
|
||||
|
||||
// 2. If the require well-formed flag is set (its value is true), and node's data contains characters that are not matched by the XML Char production or contains
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue