LibWeb: Make HTMLObjectElement invalidate the document layout

This is an oversized hammer for sure, but we have to make sure the
layout tree gets rebuilt in case the object representation changes.
Since "throw out the entire layout tree" is the finest tool we have
right now, it'll have to do.

This fixes an issue where the eyes on Acid2 would sometimes not show up
until the next layout invalidation occurred.
This commit is contained in:
Andreas Kling 2023-05-08 10:20:16 +02:00
parent 11a89a9d6e
commit 064b7a6216
Notes: sideshowbarker 2024-07-18 22:57:59 +09:00

View File

@ -339,8 +339,8 @@ void HTMLObjectElement::update_layout_and_child_objects(Representation represent
}
m_representation = representation;
set_needs_style_update(true);
document().set_needs_layout();
invalidate_style();
document().invalidate_layout();
}
// https://html.spec.whatwg.org/multipage/interaction.html#dom-tabindex