1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:18:11 +00:00

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
parent 5721b2a3da
commit e187a5365a
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());