mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-09 17:49:40 +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
Notes:
sideshowbarker
2024-07-17 11:06:06 +09:00
Author: https://github.com/ADKaster
Commit: 62a8c26b73
Pull-request: https://github.com/SerenityOS/serenity/pull/15349
Reviewed-by: https://github.com/linusg ✅
11 changed files with 51 additions and 44 deletions
|
@ -15,6 +15,7 @@ class DOMPoint final : public DOMPointReadOnly {
|
|||
WEB_PLATFORM_OBJECT(DOMPoint, DOMPointReadOnly);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<DOMPoint> construct_impl(JS::Realm&, double x = 0, double y = 0, double z = 0, double w = 0);
|
||||
static JS::NonnullGCPtr<DOMPoint> create_with_global_object(HTML::Window&, double x = 0, double y = 0, double z = 0, double w = 0);
|
||||
|
||||
virtual ~DOMPoint() override;
|
||||
|
@ -30,7 +31,7 @@ public:
|
|||
void set_w(double w) { m_w = w; }
|
||||
|
||||
private:
|
||||
DOMPoint(HTML::Window&, double x, double y, double z, double w);
|
||||
DOMPoint(JS::Realm&, double x, double y, double z, double w);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue