1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:17:45 +00:00

LibWeb: Remove unecessary dependence on Window from UIEvents classes

These classes only needed Window to get at its realm. Pass a realm
directly to construct UIEvents classes.
This commit is contained in:
Andrew Kaster 2022-09-25 18:06:11 -06:00 committed by Linus Groh
parent d0efc7734a
commit 6a10352712
10 changed files with 70 additions and 57 deletions

View file

@ -18,10 +18,12 @@ class FocusEvent final : public UIEvent {
WEB_PLATFORM_OBJECT(FocusEvent, UIEvent);
public:
static FocusEvent* create_with_global_object(HTML::Window&, FlyString const& event_name, FocusEventInit const& event_init);
static FocusEvent* construct_impl(JS::Realm&, FlyString const& event_name, FocusEventInit const& event_init);
FocusEvent(HTML::Window&, FlyString const& event_name, FocusEventInit const&);
virtual ~FocusEvent() override;
private:
FocusEvent(JS::Realm&, FlyString const& event_name, FocusEventInit const&);
};
}