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

@@ -628,11 +628,9 @@ GC::Ptr<FontLoader> FontComputer::load_font_face(ParsedFontFace const& font_face
return {};
}
auto weight = font_face.weight().value_or(0);
FontFaceKey key {
.family_name = font_face.font_family(),
.weight = { weight, weight },
.weight = font_face.weight().value_or({ 0, 0 }),
.slope = font_face.slope().value_or(0),
};