diff --git a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp index 88b255fb65..296bc7ab6e 100644 --- a/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp +++ b/Userland/Libraries/LibWeb/CSS/ResolvedCSSStyleDeclaration.cpp @@ -772,7 +772,8 @@ RefPtr ResolvedCSSStyleDeclaration::style_value_for_property(Layout: Optional ResolvedCSSStyleDeclaration::property(PropertyID property_id) const { - const_cast(m_element->document()).ensure_layout(); + // FIXME: Only update layout if required to resolve the property we're accessing. + const_cast(m_element->document()).update_layout(); if (!m_element->layout_node()) { auto style = m_element->document().style_computer().compute_style(const_cast(*m_element));