|
@@ -772,7 +772,8 @@ RefPtr<StyleValue> ResolvedCSSStyleDeclaration::style_value_for_property(Layout:
|
|
|
|
|
|
Optional<StyleProperty> ResolvedCSSStyleDeclaration::property(PropertyID property_id) const
|
|
|
{
|
|
|
- const_cast<DOM::Document&>(m_element->document()).ensure_layout();
|
|
|
+ // FIXME: Only update layout if required to resolve the property we're accessing.
|
|
|
+ const_cast<DOM::Document&>(m_element->document()).update_layout();
|
|
|
|
|
|
if (!m_element->layout_node()) {
|
|
|
auto style = m_element->document().style_computer().compute_style(const_cast<DOM::Element&>(*m_element));
|