mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:47:34 +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:
parent
d0efc7734a
commit
6a10352712
10 changed files with 70 additions and 57 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue