LibWeb: Use computed font style when parsing font-style descriptor

This means we now properly support relative units and clamping for calcs
in font-style descriptors
This commit is contained in:
Callum Law
2025-09-03 19:47:06 +12:00
committed by Sam Atkins
parent e17d91780d
commit 968a8e618c
Notes: github-actions[bot] 2025-09-19 09:07:32 +00:00

View File

@@ -98,7 +98,7 @@ ParsedFontFace ParsedFontFace::from_descriptors(CSSFontFaceDescriptors const& de
if (value->to_keyword() == Keyword::Auto)
slope = 0;
else
slope = value->as_font_style().to_font_slope();
slope = StyleComputer::compute_font_style(*value, Length::ResolutionContext::for_window(*descriptors.parent_rule()->parent_style_sheet()->owning_document()->window()))->as_font_style().to_font_slope();
}
Optional<int> width;