LibWeb: Rebuild parent element's layout tree on <object> update

These elements are quite special, so let's treat them like we do for
substantial CSS display changes and rebuild the layout tree starting
from the parent element instead of self.
This commit is contained in:
Andreas Kling 2025-04-20 20:46:52 +02:00 committed by Andreas Kling
parent 3c15fec303
commit 3ca38505fa
Notes: github-actions[bot] 2025-04-20 22:32:13 +00:00

View file

@ -562,7 +562,9 @@ void HTMLObjectElement::update_layout_and_child_objects(Representation represent
m_representation = representation;
invalidate_style(DOM::StyleInvalidationReason::HTMLObjectElementUpdateLayoutAndChildObjects);
set_needs_layout_tree_update(true);
if (auto parent_element = this->parent_element())
parent_element->set_needs_layout_tree_update(true);
}
// https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex