LibWeb: Parse @counter-style system descriptor

This commit is contained in:
Callum Law
2026-01-31 21:09:11 +13:00
committed by Sam Atkins
parent 703259a24c
commit f60bfd9e9e
Notes: github-actions[bot] 2026-02-06 10:38:11 +00:00
17 changed files with 270 additions and 25 deletions

View File

@@ -117,6 +117,7 @@ RefPtr<StyleValue const> descriptor_initial_value(AtRuleID, DescriptorID);
struct DescriptorMetadata {
enum class ValueType {
// FIXME: Parse the grammar instead of hard-coding all the options!
CounterStyleSystem,
CropOrCross,
FamilyName,
FontSrcList,
@@ -399,6 +400,8 @@ DescriptorMetadata get_descriptor_metadata(AtRuleID at_rule_id, DescriptorID des
return "String"_string;
if (syntax_string == "<unicode-range-token>#"sv)
return "UnicodeRangeTokens"_string;
if (syntax_string == "<counter-style-system>"sv)
return "CounterStyleSystem"_string;
dbgln("Unrecognized value type: `{}`", syntax_string);
VERIFY_NOT_REACHED();
}();