mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +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:
parent
a2ccb00e1d
commit
f0c5f77f99
122 changed files with 334 additions and 317 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue