diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-07 15:46:44 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-09-06 00:27:09 +0200 |
commit | 12042f075767d357a3d54b008609b0dd76354ad9 (patch) | |
tree | eef7f18424d58fd341cd517f18c0903260e4ebb8 /Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp | |
parent | 5d6cb9cbdbb1ac309d68c41929ab84f73f68753c (diff) | |
download | serenity-12042f075767d357a3d54b008609b0dd76354ad9.zip |
LibWeb: Make CSSRule and all its subclasses GC-allocated
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp index f6ac1a254b..cd10d45401 100644 --- a/Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp +++ b/Userland/Libraries/LibWeb/CSS/CSSConditionRule.cpp @@ -1,16 +1,20 @@ /* * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org> + * Copyright (c) 2022, Andreas Kling <kling@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ +#include <LibWeb/Bindings/CSSConditionRulePrototype.h> +#include <LibWeb/Bindings/WindowObject.h> #include <LibWeb/CSS/CSSConditionRule.h> namespace Web::CSS { -CSSConditionRule::CSSConditionRule(NonnullRefPtrVector<CSSRule>&& rules) - : CSSGroupingRule(move(rules)) +CSSConditionRule::CSSConditionRule(Bindings::WindowObject& window_object, CSSRuleList& rules) + : CSSGroupingRule(window_object, rules) { + set_prototype(&window_object.ensure_web_prototype<Bindings::CSSConditionRulePrototype>("CSSConditionRule")); } void CSSConditionRule::for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const |