summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-09-25 16:38:21 -0600
committerLinus Groh <mail@linusgroh.de>2022-10-01 21:05:32 +0100
commitf0c5f77f99801441db1d8e99c14dae2ab1357b47 (patch)
tree4c96ecfef6414f247421a8abf52168592fd0ab92 /Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h
parenta2ccb00e1da76b9b80fe1a804b5cbf87af91770f (diff)
downloadserenity-f0c5f77f99801441db1d8e99c14dae2ab1357b47.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h
index caaae49815..3c0b63d2e0 100644
--- a/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h
+++ b/Userland/Libraries/LibWeb/HTML/CanvasRenderingContext2D.h
@@ -51,7 +51,7 @@ class CanvasRenderingContext2D
WEB_PLATFORM_OBJECT(CanvasRenderingContext2D, Bindings::PlatformObject);
public:
- static JS::NonnullGCPtr<CanvasRenderingContext2D> create(HTML::Window&, HTMLCanvasElement&);
+ static JS::NonnullGCPtr<CanvasRenderingContext2D> create(JS::Realm&, HTMLCanvasElement&);
virtual ~CanvasRenderingContext2D() override;
virtual void fill_rect(float x, float y, float width, float height) override;
@@ -83,7 +83,7 @@ public:
virtual void clip() override;
private:
- explicit CanvasRenderingContext2D(HTML::Window&, HTMLCanvasElement&);
+ explicit CanvasRenderingContext2D(JS::Realm&, HTMLCanvasElement&);
virtual void visit_edges(Cell::Visitor&) override;