Commit graph

5 commits

Author SHA1 Message Date
Callum Law
81cb968beb LibWeb: Support symbols() function in <counter-style> 2026-02-27 16:25:53 +00:00
Callum Law
858989e006 LibWeb: Make CounterStyle ref counted
Previously we just passed around a reference to the `CounterStyle`
stored on `Document::registered_counter_styles` but this won't be
possible for anonymous counter styles (i.e. those created by the
`<symbols()>` function)
2026-02-27 16:25:53 +00:00
Callum Law
5b4b3b305b LibWeb: Remove unused to_counter_style_name_keyword()
The last user of this was removed in 8d40842 but this wasn't removed.
2026-02-27 16:25:53 +00:00
Callum Law
ca54cc6c79 LibWeb: Resolve <counter> functions using registered counter styles
Previously we only supported a subset of the predefined counter styles,
we now respect counter styles defined by `@counter-style` rules when
resolving the value of `counter()` and `counters()` functions
2026-02-23 11:21:09 +00:00
Callum Law
8a82d116d6 LibWeb: Always parse <counter-style> as such
Previously we parsed it as `<custom-ident>` in `<counter>` and as a
keyword in `list-style-type`.

The practical effect of this is:
 - Spec defined counter style names in `<counter>` are ASCII lowercased
   on parse.
 - Non spec defined counter style names are allowed in `list-style-type.

We are still to parse the `symbols()` function but this gives us a
better base for that.
2026-02-12 10:33:09 +00:00