diff options
author | Andreas Kling <kling@serenityos.org> | 2023-05-08 10:20:16 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-08 10:26:09 +0200 |
commit | 064b7a62169e9b2302344447b201ef43acd293b7 (patch) | |
tree | 33b8db3af71d3c8ececb9e4159c9d7aa0da30104 /Userland | |
parent | 11a89a9d6e7e2eec3809c8a48d80460857f99f8b (diff) | |
download | serenity-064b7a62169e9b2302344447b201ef43acd293b7.zip |
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.
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp index 2ca5c72a83..7dd9496755 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp @@ -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 |