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:
Shannon Booth 2024-11-15 04:01:23 +13:00 committed by Andreas Kling
parent ce23efc5f6
commit f87041bf3a
Notes: github-actions[bot] 2024-11-15 13:50:17 +00:00
1722 changed files with 9939 additions and 9906 deletions

View file

@ -81,9 +81,9 @@ enum class CascadeOrigin : u8 {
};
struct MatchingRule {
JS::GCPtr<DOM::ShadowRoot const> shadow_root;
JS::GCPtr<CSSRule const> rule; // Either CSSStyleRule or CSSNestedDeclarations
JS::GCPtr<CSSStyleSheet const> sheet;
GC::Ptr<DOM::ShadowRoot const> shadow_root;
GC::Ptr<CSSRule const> rule; // Either CSSStyleRule or CSSNestedDeclarations
GC::Ptr<CSSStyleSheet const> sheet;
size_t style_sheet_index { 0 };
size_t rule_index { 0 };
size_t selector_index { 0 };
@ -160,7 +160,7 @@ public:
No,
Yes,
};
void collect_animation_into(DOM::Element&, Optional<CSS::Selector::PseudoElement::Type>, JS::NonnullGCPtr<Animations::KeyframeEffect> animation, StyleProperties& style_properties, AnimationRefresh = AnimationRefresh::No) const;
void collect_animation_into(DOM::Element&, Optional<CSS::Selector::PseudoElement::Type>, GC::Ref<Animations::KeyframeEffect> animation, StyleProperties& style_properties, AnimationRefresh = AnimationRefresh::No) const;
[[nodiscard]] bool has_has_selectors() const { return m_has_has_selectors; }
@ -219,7 +219,7 @@ private:
void build_rule_cache();
void build_rule_cache_if_needed() const;
JS::NonnullGCPtr<DOM::Document> m_document;
GC::Ref<DOM::Document> m_document;
struct RuleCache {
HashMap<FlyString, Vector<MatchingRule>> rules_by_id;
@ -243,7 +243,7 @@ private:
OwnPtr<RuleCache> m_author_rule_cache;
OwnPtr<RuleCache> m_user_rule_cache;
OwnPtr<RuleCache> m_user_agent_rule_cache;
JS::Handle<CSSStyleSheet> m_user_style_sheet;
GC::Root<CSSStyleSheet> m_user_style_sheet;
using FontLoaderList = Vector<NonnullOwnPtr<FontLoader>>;
HashMap<FontFaceKey, FontLoaderList> m_loaded_fonts;