mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 00:17:46 +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:
parent
a2ccb00e1d
commit
f0c5f77f99
122 changed files with 334 additions and 317 deletions
|
@ -7,7 +7,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <LibJS/Heap/Handle.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
|
@ -17,7 +16,7 @@ class History final : public Bindings::PlatformObject {
|
|||
WEB_PLATFORM_OBJECT(History, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<History> create(HTML::Window&, DOM::Document&);
|
||||
static JS::NonnullGCPtr<History> create(JS::Realm&, DOM::Document&);
|
||||
|
||||
virtual ~History() override;
|
||||
|
||||
|
@ -25,7 +24,7 @@ public:
|
|||
WebIDL::ExceptionOr<void> replace_state(JS::Value data, String const& unused, String const& url);
|
||||
|
||||
private:
|
||||
explicit History(HTML::Window&, DOM::Document&);
|
||||
History(JS::Realm&, DOM::Document&);
|
||||
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue