From 8d05c4a675dc37a11125b2a57ba10d927197fe92 Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Sun, 6 Mar 2022 13:54:13 +0000 Subject: [PATCH] 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. --- Userland/Libraries/LibWeb/DOM/Document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/DOM/Document.cpp b/Userland/Libraries/LibWeb/DOM/Document.cpp index 41f79e2673..57fce26fb2 100644 --- a/Userland/Libraries/LibWeb/DOM/Document.cpp +++ b/Userland/Libraries/LibWeb/DOM/Document.cpp @@ -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(); }