diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index 162396ac0bb..5b2b9ea49f7 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -1508,10 +1508,10 @@ void Document::update_style() invalidate_style_of_elements_affected_by_has(); - if (!needs_full_style_update() && !needs_style_update() && !child_needs_style_update()) + if (!m_style_invalidator->has_pending_invalidations() && !needs_full_style_update() && !needs_style_update() && !child_needs_style_update()) return; - m_style_invalidator->perform_pending_style_invalidations(*this, false); + m_style_invalidator->invalidate(*this); // NOTE: If this is a document hosting