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
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

@ -13,14 +13,14 @@ namespace Web::Animations {
// https://www.w3.org/TR/web-animations-1/#animationtimeline
class AnimationTimeline : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(AnimationTimeline, Bindings::PlatformObject);
JS_DECLARE_ALLOCATOR(AnimationTimeline);
GC_DECLARE_ALLOCATOR(AnimationTimeline);
public:
Optional<double> current_time() const { return m_current_time; }
virtual void set_current_time(Optional<double>);
JS::GCPtr<DOM::Document> associated_document() const { return m_associated_document; }
void set_associated_document(JS::GCPtr<DOM::Document>);
GC::Ptr<DOM::Document> associated_document() const { return m_associated_document; }
void set_associated_document(GC::Ptr<DOM::Document>);
virtual bool is_inactive() const;
bool is_monotonically_increasing() const { return m_is_monotonically_increasing; }
@ -29,9 +29,9 @@ public:
virtual Optional<double> convert_a_timeline_time_to_an_origin_relative_time(Optional<double>) { VERIFY_NOT_REACHED(); }
virtual bool can_convert_a_timeline_time_to_an_origin_relative_time() const { return false; }
void associate_with_animation(JS::NonnullGCPtr<Animation> value) { m_associated_animations.set(value); }
void disassociate_with_animation(JS::NonnullGCPtr<Animation> value) { m_associated_animations.remove(value); }
HashTable<JS::NonnullGCPtr<Animation>> const& associated_animations() const { return m_associated_animations; }
void associate_with_animation(GC::Ref<Animation> value) { m_associated_animations.set(value); }
void disassociate_with_animation(GC::Ref<Animation> value) { m_associated_animations.remove(value); }
HashTable<GC::Ref<Animation>> const& associated_animations() const { return m_associated_animations; }
protected:
AnimationTimeline(JS::Realm&);
@ -47,9 +47,9 @@ protected:
bool m_is_monotonically_increasing { true };
// https://www.w3.org/TR/web-animations-1/#timeline-associated-with-a-document
JS::GCPtr<DOM::Document> m_associated_document {};
GC::Ptr<DOM::Document> m_associated_document {};
HashTable<JS::NonnullGCPtr<Animation>> m_associated_animations {};
HashTable<GC::Ref<Animation>> m_associated_animations {};
};
}