mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
LibWeb: Remove unecessary dependence on Window from Geometry classes
These classes only needed Window to get at its realm. Pass a realm directly to construct Geometry classes.
This commit is contained in:
parent
f0c5f77f99
commit
62a8c26b73
11 changed files with 51 additions and 44 deletions
|
@ -15,8 +15,8 @@ class DOMRect final : public DOMRectReadOnly {
|
|||
WEB_PLATFORM_OBJECT(DOMRect, DOMRectReadOnly);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<DOMRect> create_with_global_object(HTML::Window&, double x = 0, double y = 0, double width = 0, double height = 0);
|
||||
static JS::NonnullGCPtr<DOMRect> create(HTML::Window&, Gfx::FloatRect const&);
|
||||
static JS::NonnullGCPtr<DOMRect> construct_impl(JS::Realm&, double x = 0, double y = 0, double width = 0, double height = 0);
|
||||
static JS::NonnullGCPtr<DOMRect> create(JS::Realm&, Gfx::FloatRect const&);
|
||||
|
||||
virtual ~DOMRect() override;
|
||||
|
||||
|
@ -31,7 +31,7 @@ public:
|
|||
void set_height(double height) { m_rect.set_height(height); }
|
||||
|
||||
private:
|
||||
DOMRect(HTML::Window&, double x, double y, double width, double height);
|
||||
DOMRect(JS::Realm&, double x, double y, double width, double height);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue