LibWeb: Lower case only ASCII characters for selector comparisons

According to the specificcation all selector syntax is ASCII
case-insensitive.
This commit is contained in:
Tim Ledbetter 2025-11-10 21:02:25 +00:00 committed by Andreas Kling
parent 61af399b50
commit ec435a12ca
Notes: github-actions[bot] 2025-11-10 21:56:32 +00:00
2 changed files with 4 additions and 5 deletions

View file

@ -117,7 +117,7 @@ public:
struct Name {
Name(FlyString n)
: name(move(n))
, lowercase_name(name.to_string().to_lowercase().release_value_but_fixme_should_propagate_errors())
, lowercase_name(name.to_ascii_lowercase())
{
}

View file

@ -2,8 +2,7 @@ Harness status: OK
Found 3 tests
1 Pass
2 Fail
Fail CSS selector should match for Unicode uppercase element
Fail Elements with namespace should work the same way
3 Pass
Pass CSS selector should match for Unicode uppercase element
Pass Elements with namespace should work the same way
Pass `querySelector` should not use Unicode case-folding