LibWeb: Store the used font in Layout::NodeWithStyle

This is a step towards not having to carry the full set of specified
values around with every layout node.
This commit is contained in:
Andreas Kling 2021-01-06 11:05:23 +01:00
commit e187a5365a
Notes: sideshowbarker 2024-07-19 00:04:53 +09:00
7 changed files with 22 additions and 10 deletions

View file

@ -222,6 +222,8 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& specified_style)
{
auto& computed_values = static_cast<CSS::MutableComputedValues&>(m_computed_values);
m_font = specified_style.font();
auto position = specified_style.position();
if (position.has_value())
computed_values.set_position(position.value());