mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 20:45:14 +00:00
LibWeb: Dispatch a "load" event on HTMLImageElement
This commit is contained in:
parent
57464be8f1
commit
1813e083ff
Notes:
sideshowbarker
2024-07-19 07:35:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1813e083ff4
1 changed files with 4 additions and 0 deletions
|
@ -28,6 +28,7 @@
|
|||
#include <LibGfx/ImageDecoder.h>
|
||||
#include <LibWeb/CSS/StyleResolver.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/HTMLImageElement.h>
|
||||
#include <LibWeb/Layout/LayoutImage.h>
|
||||
#include <LibWeb/ResourceLoader.h>
|
||||
|
@ -64,7 +65,10 @@ void HTMLImageElement::load_image(const String& src)
|
|||
|
||||
m_encoded_data = data;
|
||||
m_image_decoder = Gfx::ImageDecoder::create(m_encoded_data.data(), m_encoded_data.size());
|
||||
|
||||
document().update_layout();
|
||||
|
||||
dispatch_event(Event::create("load"));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue