mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 06:32:30 +02:00
LibWeb: Account for animated values when computing font
Computing the font for an element in `compute_font` is premature since we are yet to apply animated properties - instead we should compute the value on the fly (with a cache to avoid unnecessary work) to ensure we are respecting the latest values
This commit is contained in:
Notes:
github-actions[bot]
2025-12-05 10:04:25 +00:00
Author: https://github.com/Calme1709 Commit: https://github.com/LadybirdBrowser/ladybird/commit/dca80ad5ebb Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6757 Reviewed-by: https://github.com/AtkinsSJ ✅ Reviewed-by: https://github.com/gmta
@@ -397,7 +397,7 @@ void NodeWithStyle::apply_style(CSS::ComputedProperties const& computed_style)
|
||||
// NOTE: We have to be careful that font-related properties get set in the right order.
|
||||
// m_font is used by Length::to_px() when resolving sizes against this layout node.
|
||||
// That's why it has to be set before everything else.
|
||||
computed_values.set_font_list(computed_style.computed_font_list());
|
||||
computed_values.set_font_list(computed_style.computed_font_list(document().font_computer()));
|
||||
computed_values.set_font_size(computed_style.font_size());
|
||||
computed_values.set_font_weight(computed_style.font_weight());
|
||||
computed_values.set_line_height(computed_style.line_height());
|
||||
|
||||
Reference in New Issue
Block a user