LibWeb: Parse @counter-style negative descriptor

This commit is contained in:
Callum Law
2026-01-31 21:24:22 +13:00
committed by Sam Atkins
parent f60bfd9e9e
commit 70c8d8746f
Notes: github-actions[bot] 2026-02-06 10:38:04 +00:00
11 changed files with 92 additions and 15 deletions

View File

@@ -118,6 +118,7 @@ struct DescriptorMetadata {
enum class ValueType {
// FIXME: Parse the grammar instead of hard-coding all the options!
CounterStyleSystem,
CounterStyleNegative,
CropOrCross,
FamilyName,
FontSrcList,
@@ -402,6 +403,8 @@ DescriptorMetadata get_descriptor_metadata(AtRuleID at_rule_id, DescriptorID des
return "UnicodeRangeTokens"_string;
if (syntax_string == "<counter-style-system>"sv)
return "CounterStyleSystem"_string;
if (syntax_string == "<counter-style-negative>"sv)
return "CounterStyleNegative"_string;
dbgln("Unrecognized value type: `{}`", syntax_string);
VERIFY_NOT_REACHED();
}();