summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/UIEvents/UIEvent.h
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-09-25 18:06:11 -0600
committerLinus Groh <mail@linusgroh.de>2022-10-01 21:05:32 +0100
commit6a103527122592501c9f86283a2abf70bd828d56 (patch)
tree34e8bb455d10dfd62877f8db81e838430ace0af5 /Userland/Libraries/LibWeb/UIEvents/UIEvent.h
parentd0efc7734aba153934a565fad240e3a586de5afb (diff)
downloadserenity-6a103527122592501c9f86283a2abf70bd828d56.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/UIEvents/UIEvent.h')
-rw-r--r--Userland/Libraries/LibWeb/UIEvents/UIEvent.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/UIEvents/UIEvent.h b/Userland/Libraries/LibWeb/UIEvents/UIEvent.h
index 8019452f12..9678696977 100644
--- a/Userland/Libraries/LibWeb/UIEvents/UIEvent.h
+++ b/Userland/Libraries/LibWeb/UIEvents/UIEvent.h
@@ -21,11 +21,8 @@ class UIEvent : public DOM::Event {
WEB_PLATFORM_OBJECT(UIEvent, DOM::Event);
public:
- static UIEvent* create(HTML::Window&, FlyString const& type);
- static UIEvent* create_with_global_object(HTML::Window&, FlyString const& event_name, UIEventInit const& event_init);
-
- UIEvent(HTML::Window&, FlyString const& event_name);
- UIEvent(HTML::Window&, FlyString const& event_name, UIEventInit const& event_init);
+ static UIEvent* create(JS::Realm&, FlyString const& type);
+ static UIEvent* construct_impl(JS::Realm&, FlyString const& event_name, UIEventInit const& event_init);
virtual ~UIEvent() override;
@@ -41,6 +38,9 @@ public:
}
protected:
+ UIEvent(JS::Realm&, FlyString const& event_name);
+ UIEvent(JS::Realm&, FlyString const& event_name, UIEventInit const& event_init);
+
virtual void visit_edges(Cell::Visitor&) override;
JS::GCPtr<HTML::Window> m_view;