mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 03:08:13 +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
|
@ -21,16 +21,14 @@ class CSSImportRule;
|
|||
class CSSStyleSheet final
|
||||
: public StyleSheet
|
||||
, public Weakable<CSSStyleSheet> {
|
||||
JS_OBJECT(CSSStyleSheet, StyleSheet);
|
||||
WEB_PLATFORM_OBJECT(CSSStyleSheet, StyleSheet);
|
||||
|
||||
public:
|
||||
static CSSStyleSheet* create(Bindings::WindowObject&, CSSRuleList& rules, Optional<AK::URL> location);
|
||||
static CSSStyleSheet* create(HTML::Window&, CSSRuleList& rules, Optional<AK::URL> location);
|
||||
|
||||
explicit CSSStyleSheet(Bindings::WindowObject&, CSSRuleList&, Optional<AK::URL> location);
|
||||
explicit CSSStyleSheet(HTML::Window&, CSSRuleList&, Optional<AK::URL> location);
|
||||
virtual ~CSSStyleSheet() override = default;
|
||||
|
||||
CSSStyleSheet& impl() { return *this; }
|
||||
|
||||
void set_owner_css_rule(CSSRule* rule) { m_owner_css_rule = rule; }
|
||||
|
||||
virtual String type() const override { return "text/css"; }
|
||||
|
@ -63,7 +61,4 @@ private:
|
|||
|
||||
}
|
||||
|
||||
namespace Web::Bindings {
|
||||
inline JS::Object* wrap(JS::Realm&, Web::CSS::CSSStyleSheet& object) { return &object; }
|
||||
using CSSStyleSheetWrapper = Web::CSS::CSSStyleSheet;
|
||||
}
|
||||
WRAPPER_HACK(CSSStyleSheet, Web::CSS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue