1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 22:05:06 +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

@ -35,7 +35,7 @@ float Length::relative_length_to_px(const Layout::Node& layout_node) const
{
switch (m_type) {
case Type::Ex:
return m_value * layout_node.specified_style().font().x_height();
return m_value * layout_node.font().x_height();
case Type::Em:
return m_value * layout_node.font_size();
case Type::Rem: