LibWeb: Use WindowProxy instead of Window in UI Events IDL

I believe this is an error in the UI Events spec, and it should be
updated to match the HTML spec (which uses WindowProxy everywhere).

This fixes a bunch of issues already covered by existing WPT tests.

Spec bug: https://github.com/w3c/uievents/issues/388

Note that WebKit has been using WindowProxy instead of Window in
UI Events IDL since 2018:
816158b4aa
This commit is contained in:
Andreas Kling 2024-11-17 21:54:03 +01:00 committed by Andreas Kling
commit 3e8c8b185e
Notes: github-actions[bot] 2024-11-17 23:00:48 +00:00
20 changed files with 32 additions and 32 deletions

View file

@ -730,7 +730,7 @@ bool KeyboardEvent::get_modifier_state(String const& key_arg) const
}
// https://w3c.github.io/uievents/#dom-keyboardevent-initkeyboardevent
void KeyboardEvent::init_keyboard_event(String const& type, bool bubbles, bool cancelable, HTML::Window* view, String const& key, WebIDL::UnsignedLong location, bool ctrl_key, bool alt_key, bool shift_key, bool meta_key)
void KeyboardEvent::init_keyboard_event(String const& type, bool bubbles, bool cancelable, GC::Ptr<HTML::WindowProxy> view, String const& key, WebIDL::UnsignedLong location, bool ctrl_key, bool alt_key, bool shift_key, bool meta_key)
{
// Initializes attributes of a KeyboardEvent object. This method has the same behavior as UIEvent.initUIEvent().
// The value of detail remains undefined.