mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 15:19:42 +00:00
LibGC+Everywhere: Factor out a LibGC from LibJS
Resulting in a massive rename across almost everywhere! Alongside the namespace change, we now have the following names: * JS::NonnullGCPtr -> GC::Ref * JS::GCPtr -> GC::Ptr * JS::HeapFunction -> GC::Function * JS::CellImpl -> GC::Cell * JS::Handle -> GC::Root
This commit is contained in:
parent
ce23efc5f6
commit
f87041bf3a
Notes:
github-actions[bot]
2024-11-15 13:50:17 +00:00
Author: https://github.com/shannonbooth
Commit: f87041bf3a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2345
1722 changed files with 9939 additions and 9906 deletions
|
@ -14,17 +14,17 @@ namespace Web::CSS {
|
|||
|
||||
class StyleSheetList final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(StyleSheetList, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(StyleSheetList);
|
||||
GC_DECLARE_ALLOCATOR(StyleSheetList);
|
||||
|
||||
public:
|
||||
[[nodiscard]] static JS::NonnullGCPtr<StyleSheetList> create(JS::NonnullGCPtr<DOM::Node> document_or_shadow_root);
|
||||
[[nodiscard]] static GC::Ref<StyleSheetList> create(GC::Ref<DOM::Node> document_or_shadow_root);
|
||||
|
||||
void add_a_css_style_sheet(CSS::CSSStyleSheet&);
|
||||
void remove_a_css_style_sheet(CSS::CSSStyleSheet&);
|
||||
void create_a_css_style_sheet(String type, DOM::Element* owner_node, String media, String title, bool alternate, bool origin_clean, Optional<String> location, CSS::CSSStyleSheet* parent_style_sheet, CSS::CSSRule* owner_rule, CSS::CSSStyleSheet&);
|
||||
|
||||
Vector<JS::NonnullGCPtr<CSSStyleSheet>> const& sheets() const { return m_sheets; }
|
||||
Vector<JS::NonnullGCPtr<CSSStyleSheet>>& sheets() { return m_sheets; }
|
||||
Vector<GC::Ref<CSSStyleSheet>> const& sheets() const { return m_sheets; }
|
||||
Vector<GC::Ref<CSSStyleSheet>>& sheets() { return m_sheets; }
|
||||
|
||||
CSSStyleSheet* item(size_t index) const
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ public:
|
|||
[[nodiscard]] DOM::Node const& document_or_shadow_root() const { return m_document_or_shadow_root; }
|
||||
|
||||
private:
|
||||
explicit StyleSheetList(JS::NonnullGCPtr<DOM::Node> document_or_shadow_root);
|
||||
explicit StyleSheetList(GC::Ref<DOM::Node> document_or_shadow_root);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
@ -52,8 +52,8 @@ private:
|
|||
void add_sheet(CSSStyleSheet&);
|
||||
void remove_sheet(CSSStyleSheet&);
|
||||
|
||||
JS::NonnullGCPtr<DOM::Node> m_document_or_shadow_root;
|
||||
Vector<JS::NonnullGCPtr<CSSStyleSheet>> m_sheets;
|
||||
GC::Ref<DOM::Node> m_document_or_shadow_root;
|
||||
Vector<GC::Ref<CSSStyleSheet>> m_sheets;
|
||||
|
||||
// https://www.w3.org/TR/cssom/#preferred-css-style-sheet-set-name
|
||||
String m_preferred_css_style_sheet_set_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue