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

@@ -582,7 +582,8 @@ GC::Ref<WebIDL::Promise> FontFace::load()
ParsedFontFace parsed_font_face {
font_face_rule,
m_family,
m_weight.to_number<int>(),
// FIXME: Actually parse this as we're supposed to.
m_weight.to_number<int>().map([](auto weight) { return FontWeightRange { weight, weight }; }),
0, // FIXME: slope
Gfx::FontWidth::Normal, // FIXME: width
m_urls,