mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
LibWeb: Add SVGImageElement load and error events
This resolves all WPT timeouts in html/canvas/element/manual/imagebitmap We can now run an additional 6 tests and 126 subtests :) This also adds regression tests for this behavior.
This commit is contained in:
committed by
Tim Ledbetter
parent
c097f53875
commit
0c04bd6676
@@ -9,6 +9,7 @@
|
||||
#include <LibJS/Heap/Heap.h>
|
||||
#include <LibWeb/Bindings/SVGImageElementPrototype.h>
|
||||
#include <LibWeb/DOM/DocumentObserver.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/HTML/PotentialCORSRequest.h>
|
||||
#include <LibWeb/HTML/SharedResourceRequest.h>
|
||||
#include <LibWeb/Layout/SVGImageBox.h>
|
||||
@@ -161,9 +162,13 @@ void SVGImageElement::fetch_the_document(URL::URL const& url)
|
||||
}
|
||||
set_needs_style_update(true);
|
||||
document().set_needs_layout();
|
||||
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::load));
|
||||
},
|
||||
[this] {
|
||||
m_load_event_delayer.clear();
|
||||
|
||||
dispatch_event(DOM::Event::create(realm(), HTML::EventNames::error));
|
||||
});
|
||||
|
||||
if (m_resource_request->needs_fetching()) {
|
||||
|
||||
Reference in New Issue
Block a user