Commit Graph

4 Commits

Author SHA1 Message Date
Callum Law
bd1ebdb8bb LibWeb: Add reusable CounterStyleAlgorithmOrExtends type
We already use this in a few places and will use it even more in later
commits
2026-02-27 12:10:44 +00:00
Callum Law
c467c2f9ca LibWeb: Make CounterStyleDefinition::create return type non-optional
And also use it within `from_counter_style`
2026-02-27 12:10:44 +00:00
Callum Law
73b07d25ac LibWeb: Resolve and register counter styles from @counter-style rules
The tricky bit of this is resolving cycles in extending rules and
ensuring that counter styles are registered in the required order for
extension (i.e. for any pair of extended/extending rules the extended
one should be registered first).
2026-02-23 11:21:09 +00:00
Callum Law
bb5c8bb5be LibWeb: Add CounterStyleDefinition
This serves as an intermediate step between `CSSCounterStyleRule` and a
fully built counter style which will be helpful for:
 - Determining whether a rule defines a counter style
 - Resolving extends cycles
 - Determining registration order
2026-02-23 11:21:09 +00:00