mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
The spec requires us to accept any ident here, not just ltr/rtl, and also serialize it back out. That means we need to keep the original string around. In order to not call keyword_from_string() every time we want to match a :dir() selector, we still attempt to parse the keyword and keep it around. A small behaviour change is that now we'll serialize the ident with its original casing, instead of always lowercase. Chrome and Firefox disagree on this, so I think either is fine until that can be officially decided. Gets us 2 WPT passes (including 1 from the as-yet-unmerged :dir() test).
15 lines
No EOL
531 B
Text
15 lines
No EOL
531 B
Text
Harness status: OK
|
|
|
|
Found 10 tests
|
|
|
|
10 Pass
|
|
Pass ":dir(rtl)" should be a valid selector
|
|
Pass ":dir( rtl )" should be a valid selector
|
|
Pass ":dir(ltr):dir(rtl)" should be a valid selector
|
|
Pass "foo:dir(RTL)" should be a valid selector
|
|
Pass ":dir(auto)" should be a valid selector
|
|
Pass ":dir(none)" should be a valid selector
|
|
Pass ":dir(something-made-up)" should be a valid selector
|
|
Pass ":dir()" should be an invalid selector
|
|
Pass ":dir(\"ltr\")" should be an invalid selector
|
|
Pass ":dir(ltr, rtl)" should be an invalid selector |