LibWeb: Mark the Window resize event as trusted

This commit is contained in:
Luke Wilde 2025-01-28 14:32:07 +00:00 committed by Andreas Kling
parent f4649aa40d
commit d21bac8028
Notes: github-actions[bot] 2025-01-29 08:24:52 +00:00

View file

@ -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();
}