1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 02:28:12 +00:00

LibWeb: Remove unecessary dependence on Window from HTML classes

These classes only needed Window to get at its realm. Pass a realm
directly to construct HTML classes.
This commit is contained in:
Andrew Kaster 2022-09-25 16:38:21 -06:00 committed by Linus Groh
parent a2ccb00e1d
commit f0c5f77f99
122 changed files with 334 additions and 317 deletions

View file

@ -19,16 +19,16 @@ class SubmitEvent final : public DOM::Event {
WEB_PLATFORM_OBJECT(SubmitEvent, DOM::Event);
public:
static SubmitEvent* create(HTML::Window&, FlyString const& event_name, SubmitEventInit const& event_init);
static SubmitEvent* create_with_global_object(HTML::Window&, FlyString const& event_name, SubmitEventInit const& event_init);
static SubmitEvent* create(JS::Realm&, FlyString const& event_name, SubmitEventInit const& event_init);
static SubmitEvent* construct_impl(JS::Realm&, FlyString const& event_name, SubmitEventInit const& event_init);
virtual ~SubmitEvent() override;
SubmitEvent(HTML::Window&, FlyString const& event_name, SubmitEventInit const& event_init);
JS::GCPtr<HTMLElement> submitter() const { return m_submitter; }
private:
SubmitEvent(JS::Realm&, FlyString const& event_name, SubmitEventInit const& event_init);
virtual void visit_edges(Cell::Visitor&) override;
JS::GCPtr<HTMLElement> m_submitter;