1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 18:10:56 +09:00
Commit graph

2 commits

Author SHA1 Message Date
Sam Atkins
7aed541ed0 LibWeb/CSS: Automatically serialize functional pseudo-class arguments
The spec gives us a hard-coded list of functional pseudo-classes and how
to serialize them - but this list is incomplete and likely to always be
outdated compared to the list of pseudo-classes that exist. So instead,
use the generated metadata we already have to serialize their arguments
based on their type.

This fixes :dir() and :has(), which previously did not serialize their
arguments.

Gets us 26 passes (including 6 from that as-yet-unmerged :dir() test).
2025-05-17 00:30:44 +02:00
Sam Atkins
5f144f366d Tests: Create a test for :dir() parsing/serialization
Submitted to WPT as https://github.com/web-platform-tests/wpt/pull/52598
but in the meantime here's a local version.

The spec for this isn't super thorough, so the tests are based on how
Chrome and Firefox behave. Specifically, Firefox returns the ltr/rtl
keyword in lowercase but Chrome keeps the original case for it.

We currently fail most of these but that will be fixed in subsequent
commits.
2025-05-17 00:30:44 +02:00