From d21bac802840a32d6a0fbff3e875c6ed40c5b894 Mon Sep 17 00:00:00 2001 From: Luke Wilde Date: Tue, 28 Jan 2025 14:32:07 +0000 Subject: [PATCH] LibWeb: Mark the Window resize event as trusted --- Libraries/LibWeb/DOM/Document.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Libraries/LibWeb/DOM/Document.cpp b/Libraries/LibWeb/DOM/Document.cpp index e48a7f52028..8a1d9ac5ede 100644 --- a/Libraries/LibWeb/DOM/Document.cpp +++ b/Libraries/LibWeb/DOM/Document.cpp @@ -3199,8 +3199,11 @@ void Document::run_the_resize_steps() return; m_last_viewport_size = viewport_size; - if (!is_initial_size) - window()->dispatch_event(DOM::Event::create(realm(), UIEvents::EventNames::resize)); + if (!is_initial_size) { + auto window_resize_event = DOM::Event::create(realm(), UIEvents::EventNames::resize); + window_resize_event->set_is_trusted(true); + window()->dispatch_event(window_resize_event); + } schedule_layout_update(); }