diff options
author | Andreas Kling <kling@serenityos.org> | 2021-10-18 10:37:26 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-10-18 10:40:30 +0200 |
commit | 177320ee9c235e49420e5f7acd4bfe327723da71 (patch) | |
tree | 9ab4e1c20ca51f335dfac62351bfafb7312ce53e /Userland | |
parent | f72a37b9d41b541efa2e2dcaab18e183557d2e68 (diff) | |
download | serenity-177320ee9c235e49420e5f7acd4bfe327723da71.zip |
LibWeb: Update <img> style on resource load/failure
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp index 8265d0099a..5ffc3a2fd1 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLImageElement.cpp @@ -21,7 +21,7 @@ HTMLImageElement::HTMLImageElement(DOM::Document& document, QualifiedName qualif , m_image_loader(*this) { m_image_loader.on_load = [this] { - this->document().schedule_style_update(); + set_needs_style_update(true); queue_an_element_task(HTML::Task::Source::DOMManipulation, [this] { dispatch_event(DOM::Event::create(EventNames::load)); }); @@ -29,7 +29,7 @@ HTMLImageElement::HTMLImageElement(DOM::Document& document, QualifiedName qualif m_image_loader.on_fail = [this] { dbgln("HTMLImageElement: Resource did fail: {}", src()); - this->document().schedule_style_update(); + set_needs_style_update(true); queue_an_element_task(HTML::Task::Source::DOMManipulation, [this] { dispatch_event(DOM::Event::create(EventNames::error)); }); |