LibWeb: Parse @counter-style fallback descriptor

This commit is contained in:
Callum Law
2026-01-31 22:13:31 +13:00
committed by Sam Atkins
parent 9b376240f9
commit 1f8c9cf662
Notes: github-actions[bot] 2026-02-06 10:37:37 +00:00
9 changed files with 62 additions and 14 deletions

View File

@@ -118,6 +118,7 @@ struct DescriptorMetadata {
enum class ValueType {
// FIXME: Parse the grammar instead of hard-coding all the options!
CounterStyleSystem,
CounterStyleName,
CounterStyleNegative,
CounterStylePad,
CounterStyleRange,
@@ -414,6 +415,8 @@ DescriptorMetadata get_descriptor_metadata(AtRuleID at_rule_id, DescriptorID des
return "CounterStyleRange"_string;
if (syntax_string == "<counter-style-pad>"sv)
return "CounterStylePad"_string;
if (syntax_string == "<counter-style-name>"sv)
return "CounterStyleName"_string;
dbgln("Unrecognized value type: `{}`", syntax_string);
VERIFY_NOT_REACHED();
}();