mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
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:
Notes:
github-actions[bot]
2025-09-19 09:07:32 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/968a8e618c8 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6072 Reviewed-by: https://github.com/AtkinsSJ ✅
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user