diff --git a/Libraries/LibWeb/DOM/Document.h b/Libraries/LibWeb/DOM/Document.h index 08dbcf14d61..935c9bec40f 100644 --- a/Libraries/LibWeb/DOM/Document.h +++ b/Libraries/LibWeb/DOM/Document.h @@ -53,7 +53,6 @@ enum class QuirksMode { #define ENUMERATE_INVALIDATE_LAYOUT_TREE_REASONS(X) \ X(DocumentAddAnElementToTheTopLayer) \ X(DocumentRequestAnElementToBeRemovedFromTheTopLayer) \ - X(HTMLObjectElement) \ X(ShadowRootSetInnerHTML) enum class InvalidateLayoutTreeReason { diff --git a/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Libraries/LibWeb/HTML/HTMLObjectElement.cpp index 86c257cdfe6..ad99a4cac32 100644 --- a/Libraries/LibWeb/HTML/HTMLObjectElement.cpp +++ b/Libraries/LibWeb/HTML/HTMLObjectElement.cpp @@ -561,7 +561,7 @@ void HTMLObjectElement::update_layout_and_child_objects(Representation represent m_representation = representation; invalidate_style(DOM::StyleInvalidationReason::HTMLObjectElementUpdateLayoutAndChildObjects); - document().invalidate_layout_tree(DOM::InvalidateLayoutTreeReason::HTMLObjectElement); + set_needs_layout_tree_update(true); } // https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex