mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:07:45 +00:00
LibWeb: Remove unecessary dependence on Window from SVG classes
These classes only needed Window to get at its realm. Pass a realm directly to construct SCG classes.
This commit is contained in:
parent
62a8c26b73
commit
320dddde6a
20 changed files with 87 additions and 93 deletions
|
@ -16,7 +16,7 @@ class SVGLength : public Bindings::PlatformObject {
|
|||
WEB_PLATFORM_OBJECT(SVGLength, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<SVGLength> create(HTML::Window&, u8 unit_type, float value);
|
||||
static JS::NonnullGCPtr<SVGLength> create(JS::Realm&, u8 unit_type, float value);
|
||||
virtual ~SVGLength() override;
|
||||
|
||||
u8 unit_type() const { return m_unit_type; }
|
||||
|
@ -25,7 +25,7 @@ public:
|
|||
WebIDL::ExceptionOr<void> set_value(float value);
|
||||
|
||||
private:
|
||||
SVGLength(HTML::Window&, u8 unit_type, float value);
|
||||
SVGLength(JS::Realm&, u8 unit_type, float value);
|
||||
|
||||
u8 m_unit_type { 0 };
|
||||
float m_value { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue