mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-24 11:21:34 +00:00
LibWeb: Make CSSRule and all its subclasses GC-allocated
This commit is contained in:
parent
5d6cb9cbdb
commit
12042f0757
Notes:
sideshowbarker
2024-07-17 07:29:03 +09:00
Author: https://github.com/awesomekling
Commit: 12042f0757
Pull-request: https://github.com/SerenityOS/serenity/pull/14816
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/linusg ✅
39 changed files with 338 additions and 236 deletions
|
@ -15,9 +15,10 @@ namespace Web::CSS {
|
|||
class CSSConditionRule : public CSSGroupingRule {
|
||||
AK_MAKE_NONCOPYABLE(CSSConditionRule);
|
||||
AK_MAKE_NONMOVABLE(CSSConditionRule);
|
||||
JS_OBJECT(CSSConditionRule, CSSGroupingRule);
|
||||
|
||||
public:
|
||||
using WrapperType = Bindings::CSSConditionRuleWrapper;
|
||||
CSSConditionRule& impl() { return *this; }
|
||||
|
||||
virtual ~CSSConditionRule() = default;
|
||||
|
||||
|
@ -28,7 +29,12 @@ public:
|
|||
virtual void for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const override;
|
||||
|
||||
protected:
|
||||
explicit CSSConditionRule(NonnullRefPtrVector<CSSRule>&&);
|
||||
explicit CSSConditionRule(Bindings::WindowObject&, CSSRuleList&);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::CSS::CSSConditionRule& object) { return &object; }
|
||||
using CSSConditionRuleWrapper = Web::CSS::CSSConditionRule;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue