mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +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:
committed by
Linus Groh
parent
a2ccb00e1d
commit
f0c5f77f99
@@ -14,7 +14,7 @@ class TextMetrics : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(TextMetrics, Bindings::PlatformObject);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<TextMetrics> create(HTML::Window&);
|
||||
static JS::NonnullGCPtr<TextMetrics> create(JS::Realm&);
|
||||
|
||||
virtual ~TextMetrics() override;
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
void set_ideographic_baseline(double baseline) { m_ideographic_baseline = baseline; }
|
||||
|
||||
private:
|
||||
explicit TextMetrics(HTML::Window&);
|
||||
explicit TextMetrics(JS::Realm&);
|
||||
|
||||
double m_width { 0 };
|
||||
double m_actual_bounding_box_left { 0 };
|
||||
|
||||
Reference in New Issue
Block a user