summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp')
-rw-r--r--Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp
index 15140c9c10..b02a29ecce 100644
--- a/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp
+++ b/Userland/Libraries/LibWeb/CSS/CSSSupportsRule.cpp
@@ -4,22 +4,23 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <LibWeb/Bindings/CSSSupportsRulePrototype.h>
+#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/CSS/CSSSupportsRule.h>
#include <LibWeb/CSS/Parser/Parser.h>
-#include <LibWeb/HTML/Window.h>
namespace Web::CSS {
-CSSSupportsRule* CSSSupportsRule::create(HTML::Window& window_object, NonnullRefPtr<Supports>&& supports, CSSRuleList& rules)
+CSSSupportsRule* CSSSupportsRule::create(JS::Realm& realm, NonnullRefPtr<Supports>&& supports, CSSRuleList& rules)
{
- return window_object.heap().allocate<CSSSupportsRule>(window_object.realm(), window_object, move(supports), rules);
+ return realm.heap().allocate<CSSSupportsRule>(realm, realm, move(supports), rules);
}
-CSSSupportsRule::CSSSupportsRule(HTML::Window& window_object, NonnullRefPtr<Supports>&& supports, CSSRuleList& rules)
- : CSSConditionRule(window_object, rules)
+CSSSupportsRule::CSSSupportsRule(JS::Realm& realm, NonnullRefPtr<Supports>&& supports, CSSRuleList& rules)
+ : CSSConditionRule(realm, rules)
, m_supports(move(supports))
{
- set_prototype(&window_object.cached_web_prototype("CSSSupportsRule"));
+ set_prototype(&Bindings::ensure_web_prototype<Bindings::CSSSupportsRulePrototype>(realm, "CSSSupportsRule"));
}
String CSSSupportsRule::condition_text() const