LibWeb: Fire resize event at the Window instead of Document

The spec says "fire an event named resize at the Window object
associated with doc."

However, we were accidentally firing it at `doc` instead of the Window.
This commit is contained in:
Luke Wilde 2022-03-06 13:54:13 +00:00 committed by Andreas Kling
parent dbc2b746b8
commit 8d05c4a675
Notes: sideshowbarker 2024-07-17 17:52:36 +09:00

View File

@ -1286,7 +1286,7 @@ void Document::run_the_resize_steps()
return;
m_last_viewport_size = viewport_size;
dispatch_event(DOM::Event::create(UIEvents::EventNames::resize));
window().dispatch_event(DOM::Event::create(UIEvents::EventNames::resize));
update_layout();
}