summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2022-03-16 23:12:18 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-16 23:13:05 +0100
commita4030869400f2a80c903982b125ead55c1b55a8c (patch)
tree8819f649c68299d043bd6fb15de22c648883c5d0 /Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
parentbe5f0b5ac4d959bde4501954acae066603dc2e95 (diff)
downloadserenity-a4030869400f2a80c903982b125ead55c1b55a8c.zip
LibWeb: Schedule a relayout after <image> and <object> elements load
Otherwise we'll be stuck with the intrinsic dimensions of the replacement content.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
index 7da61598b6..d4586ac172 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
+++ b/Userland/Libraries/LibWeb/HTML/HTMLObjectElement.cpp
@@ -21,6 +21,7 @@ HTMLObjectElement::HTMLObjectElement(DOM::Document& document, DOM::QualifiedName
m_image_loader.on_load = [this] {
m_should_show_fallback_content = false;
set_needs_style_update(true);
+ this->document().set_needs_layout();
// FIXME: This should be done by the HTML^Wdocument parser.
dispatch_event(DOM::Event::create(HTML::EventNames::load));
};
@@ -28,6 +29,7 @@ HTMLObjectElement::HTMLObjectElement(DOM::Document& document, DOM::QualifiedName
m_image_loader.on_fail = [this] {
m_should_show_fallback_content = true;
set_needs_style_update(true);
+ this->document().set_needs_layout();
// FIXME: This should be done by the HTML^Wdocument parser.
dispatch_event(DOM::Event::create(HTML::EventNames::load));
};