mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:07:35 +00:00
LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
This commit is contained in:
parent
bb547ce1c4
commit
6f433c8656
445 changed files with 4797 additions and 4268 deletions
|
@ -13,13 +13,9 @@
|
|||
namespace Web::CSS {
|
||||
|
||||
class CSSConditionRule : public CSSGroupingRule {
|
||||
AK_MAKE_NONCOPYABLE(CSSConditionRule);
|
||||
AK_MAKE_NONMOVABLE(CSSConditionRule);
|
||||
JS_OBJECT(CSSConditionRule, CSSGroupingRule);
|
||||
WEB_PLATFORM_OBJECT(CSSConditionRule, CSSGroupingRule);
|
||||
|
||||
public:
|
||||
CSSConditionRule& impl() { return *this; }
|
||||
|
||||
virtual ~CSSConditionRule() = default;
|
||||
|
||||
virtual String condition_text() const = 0;
|
||||
|
@ -29,12 +25,9 @@ public:
|
|||
virtual void for_each_effective_style_rule(Function<void(CSSStyleRule const&)> const& callback) const override;
|
||||
|
||||
protected:
|
||||
explicit CSSConditionRule(Bindings::WindowObject&, CSSRuleList&);
|
||||
explicit CSSConditionRule(HTML::Window&, CSSRuleList&);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::CSS::CSSConditionRule& object) { return &object; }
|
||||
using CSSConditionRuleWrapper = Web::CSS::CSSConditionRule;
|
||||
}
|
||||
WRAPPER_HACK(CSSConditionRule, Web::CSS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue