LibWeb/CSS: Parse @font-face { font-weight } with two values

WPT has coverage for matching but not parsing, so the test is homemade.
This commit is contained in:
Sam Atkins
2026-02-17 14:44:59 +00:00
parent 2660db3f52
commit f657a4b71b
Notes: github-actions[bot] 2026-02-24 10:06:14 +00:00
11 changed files with 227 additions and 14 deletions

View File

@@ -126,6 +126,7 @@ struct DescriptorMetadata {
CropOrCross,
FamilyName,
FontSrcList,
FontWeightAbsolutePair,
Length,
OptionalDeclarationValue,
PageSize,
@@ -395,6 +396,8 @@ DescriptorMetadata get_descriptor_metadata(AtRuleID at_rule_id, DescriptorID des
return "FamilyName"_string;
if (syntax_string == "<font-src-list>"sv)
return "FontSrcList"_string;
if (syntax_string == "<font-weight-absolute>{1,2}"sv)
return "FontWeightAbsolutePair"_string;
if (syntax_string == "<declaration-value>?"sv)
return "OptionalDeclarationValue"_string;
if (syntax_string == "<length>"sv)