1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 23:47:45 +00:00

LibWeb: Remove unecessary dependence on Window from CSS classes

These classes only needed Window to get at its realm. Pass a realm
directly to construct CSS classes.
This commit is contained in:
Andrew Kaster 2022-09-24 16:34:04 -06:00 committed by Linus Groh
parent 8de7e49a56
commit a2ccb00e1d
37 changed files with 159 additions and 146 deletions

View file

@ -23,10 +23,9 @@ class CSSRuleList : public Bindings::LegacyPlatformObject {
WEB_PLATFORM_OBJECT(CSSRuleList, Bindings::LegacyPlatformObject);
public:
static CSSRuleList* create(HTML::Window&, JS::MarkedVector<CSSRule*> const&);
static CSSRuleList* create_empty(HTML::Window&);
static CSSRuleList* create(JS::Realm&, JS::MarkedVector<CSSRule*> const&);
static CSSRuleList* create_empty(JS::Realm&);
explicit CSSRuleList(HTML::Window&);
~CSSRuleList() = default;
CSSRule const* item(size_t index) const
@ -65,6 +64,8 @@ public:
bool evaluate_media_queries(HTML::Window const&);
private:
explicit CSSRuleList(JS::Realm&);
virtual void visit_edges(Cell::Visitor&) override;
Vector<CSSRule&> m_rules;