mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +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
|
@ -24,9 +24,9 @@ class CSSStyleSheet final
|
|||
JS_OBJECT(CSSStyleSheet, StyleSheet);
|
||||
|
||||
public:
|
||||
static CSSStyleSheet* create(Bindings::WindowObject&, NonnullRefPtrVector<CSSRule> rules, Optional<AK::URL> location);
|
||||
static CSSStyleSheet* create(Bindings::WindowObject&, CSSRuleList& rules, Optional<AK::URL> location);
|
||||
|
||||
explicit CSSStyleSheet(Bindings::WindowObject&, NonnullRefPtrVector<CSSRule>, Optional<AK::URL> location);
|
||||
explicit CSSStyleSheet(Bindings::WindowObject&, CSSRuleList&, Optional<AK::URL> location);
|
||||
virtual ~CSSStyleSheet() override = default;
|
||||
|
||||
CSSStyleSheet& impl() { return *this; }
|
||||
|
@ -57,9 +57,8 @@ private:
|
|||
|
||||
CSSRuleList* m_rules { nullptr };
|
||||
|
||||
WeakPtr<CSSRule> m_owner_css_rule;
|
||||
|
||||
JS::GCPtr<StyleSheetList> m_style_sheet_list;
|
||||
CSSRule* m_owner_css_rule { nullptr };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue