mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-28 05:52:53 +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,28 +14,28 @@ namespace Web::ResizeObserver {
|
|||
|
||||
// https://drafts.csswg.org/resize-observer-1/#resize-observation-interface
|
||||
class ResizeObservation : public JS::Cell {
|
||||
JS_CELL(ResizeObservation, JS::Cell);
|
||||
JS_DECLARE_ALLOCATOR(ResizeObservation);
|
||||
GC_CELL(ResizeObservation, JS::Cell);
|
||||
GC_DECLARE_ALLOCATOR(ResizeObservation);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<ResizeObservation>> create(JS::Realm&, DOM::Element&, Bindings::ResizeObserverBoxOptions);
|
||||
static WebIDL::ExceptionOr<GC::Ref<ResizeObservation>> create(JS::Realm&, DOM::Element&, Bindings::ResizeObserverBoxOptions);
|
||||
|
||||
bool is_active();
|
||||
|
||||
JS::NonnullGCPtr<DOM::Element> target() const { return m_target; }
|
||||
GC::Ref<DOM::Element> target() const { return m_target; }
|
||||
Bindings::ResizeObserverBoxOptions observed_box() const { return m_observed_box; }
|
||||
|
||||
Vector<JS::NonnullGCPtr<ResizeObserverSize>>& last_reported_sizes() { return m_last_reported_sizes; }
|
||||
Vector<GC::Ref<ResizeObserverSize>>& last_reported_sizes() { return m_last_reported_sizes; }
|
||||
|
||||
explicit ResizeObservation(JS::Realm& realm, DOM::Element& target, Bindings::ResizeObserverBoxOptions observed_box);
|
||||
|
||||
private:
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
JS::NonnullGCPtr<JS::Realm> m_realm;
|
||||
JS::NonnullGCPtr<DOM::Element> m_target;
|
||||
GC::Ref<JS::Realm> m_realm;
|
||||
GC::Ref<DOM::Element> m_target;
|
||||
Bindings::ResizeObserverBoxOptions m_observed_box;
|
||||
Vector<JS::NonnullGCPtr<ResizeObserverSize>> m_last_reported_sizes;
|
||||
Vector<GC::Ref<ResizeObserverSize>> m_last_reported_sizes;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue