summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/CSSRuleList.h
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2022-09-24 16:34:04 -0600
committerLinus Groh <mail@linusgroh.de>2022-10-01 21:05:32 +0100
commita2ccb00e1da76b9b80fe1a804b5cbf87af91770f (patch)
tree480db40c05e54388c283b3166f4b8786a22c8a25 /Userland/Libraries/LibWeb/CSS/CSSRuleList.h
parent8de7e49a5648cdf084689a6b6cb49715f8ccad02 (diff)
downloadserenity-a2ccb00e1da76b9b80fe1a804b5cbf87af91770f.zip
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.
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/CSSRuleList.h')
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSRuleList.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSRuleList.h b/Userland/Libraries/LibWeb/CSS/CSSRuleList.h
index 17c9297505..dc5537891f 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSRuleList.h
+++ b/Userland/Libraries/LibWeb/CSS/CSSRuleList.h
@@ -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;