mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 23:30:20 +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
|
@ -20,10 +20,10 @@ struct ResizeObserverOptions {
|
|||
// https://drafts.csswg.org/resize-observer-1/#resize-observer-interface
|
||||
class ResizeObserver : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(ResizeObserver, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(ResizeObserver);
|
||||
GC_DECLARE_ALLOCATOR(ResizeObserver);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<ResizeObserver>> construct_impl(JS::Realm&, WebIDL::CallbackType* callback);
|
||||
static WebIDL::ExceptionOr<GC::Ref<ResizeObserver>> construct_impl(JS::Realm&, WebIDL::CallbackType* callback);
|
||||
|
||||
virtual ~ResizeObserver() override;
|
||||
|
||||
|
@ -31,11 +31,11 @@ public:
|
|||
void unobserve(DOM::Element& target);
|
||||
void disconnect();
|
||||
|
||||
void invoke_callback(ReadonlySpan<JS::NonnullGCPtr<ResizeObserverEntry>> entries) const;
|
||||
void invoke_callback(ReadonlySpan<GC::Ref<ResizeObserverEntry>> entries) const;
|
||||
|
||||
Vector<JS::NonnullGCPtr<ResizeObservation>>& observation_targets() { return m_observation_targets; }
|
||||
Vector<JS::NonnullGCPtr<ResizeObservation>>& active_targets() { return m_active_targets; }
|
||||
Vector<JS::NonnullGCPtr<ResizeObservation>>& skipped_targets() { return m_skipped_targets; }
|
||||
Vector<GC::Ref<ResizeObservation>>& observation_targets() { return m_observation_targets; }
|
||||
Vector<GC::Ref<ResizeObservation>>& active_targets() { return m_active_targets; }
|
||||
Vector<GC::Ref<ResizeObservation>>& skipped_targets() { return m_skipped_targets; }
|
||||
|
||||
private:
|
||||
explicit ResizeObserver(JS::Realm&, WebIDL::CallbackType* callback);
|
||||
|
@ -44,10 +44,10 @@ private:
|
|||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
virtual void finalize() override;
|
||||
|
||||
JS::GCPtr<WebIDL::CallbackType> m_callback;
|
||||
Vector<JS::NonnullGCPtr<ResizeObservation>> m_observation_targets;
|
||||
Vector<JS::NonnullGCPtr<ResizeObservation>> m_active_targets;
|
||||
Vector<JS::NonnullGCPtr<ResizeObservation>> m_skipped_targets;
|
||||
GC::Ptr<WebIDL::CallbackType> m_callback;
|
||||
Vector<GC::Ref<ResizeObservation>> m_observation_targets;
|
||||
Vector<GC::Ref<ResizeObservation>> m_active_targets;
|
||||
Vector<GC::Ref<ResizeObservation>> m_skipped_targets;
|
||||
|
||||
// AD-HOC: This is the document where we've registered the observer.
|
||||
WeakPtr<DOM::Document> m_document;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue