mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 14:19:48 +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
|
@ -18,21 +18,21 @@ namespace Web::ResizeObserver {
|
|||
// https://drafts.csswg.org/resize-observer-1/#resize-observer-entry-interface
|
||||
class ResizeObserverEntry : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(ResizeObserverEntry, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(ResizeObserverEntry);
|
||||
GC_DECLARE_ALLOCATOR(ResizeObserverEntry);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<ResizeObserverEntry>> create_and_populate(JS::Realm&, DOM::Element& target);
|
||||
static WebIDL::ExceptionOr<GC::Ref<ResizeObserverEntry>> create_and_populate(JS::Realm&, DOM::Element& target);
|
||||
|
||||
JS::NonnullGCPtr<Geometry::DOMRectReadOnly> content_rect() const { return *m_content_rect; }
|
||||
JS::NonnullGCPtr<DOM::Element> target() const { return m_target; }
|
||||
GC::Ref<Geometry::DOMRectReadOnly> content_rect() const { return *m_content_rect; }
|
||||
GC::Ref<DOM::Element> target() const { return m_target; }
|
||||
|
||||
Vector<JS::NonnullGCPtr<ResizeObserverSize>> const& border_box_size() const { return m_border_box_size; }
|
||||
Vector<JS::NonnullGCPtr<ResizeObserverSize>> const& content_box_size() const { return m_content_box_size; }
|
||||
Vector<JS::NonnullGCPtr<ResizeObserverSize>> const& device_pixel_content_box_size() const { return m_device_pixel_content_box_size; }
|
||||
Vector<GC::Ref<ResizeObserverSize>> const& border_box_size() const { return m_border_box_size; }
|
||||
Vector<GC::Ref<ResizeObserverSize>> const& content_box_size() const { return m_content_box_size; }
|
||||
Vector<GC::Ref<ResizeObserverSize>> const& device_pixel_content_box_size() const { return m_device_pixel_content_box_size; }
|
||||
|
||||
JS::NonnullGCPtr<JS::Object> border_box_size_js_array() const;
|
||||
JS::NonnullGCPtr<JS::Object> content_box_size_js_array() const;
|
||||
JS::NonnullGCPtr<JS::Object> device_pixel_content_box_size_js_array() const;
|
||||
GC::Ref<JS::Object> border_box_size_js_array() const;
|
||||
GC::Ref<JS::Object> content_box_size_js_array() const;
|
||||
GC::Ref<JS::Object> device_pixel_content_box_size_js_array() const;
|
||||
|
||||
private:
|
||||
explicit ResizeObserverEntry(JS::Realm& realm, DOM::Element& target)
|
||||
|
@ -44,13 +44,13 @@ private:
|
|||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void visit_edges(JS::Cell::Visitor&) override;
|
||||
|
||||
JS::NonnullGCPtr<DOM::Element> m_target;
|
||||
GC::Ref<DOM::Element> m_target;
|
||||
|
||||
Vector<JS::NonnullGCPtr<ResizeObserverSize>> m_content_box_size;
|
||||
Vector<JS::NonnullGCPtr<ResizeObserverSize>> m_border_box_size;
|
||||
Vector<JS::NonnullGCPtr<ResizeObserverSize>> m_device_pixel_content_box_size;
|
||||
Vector<GC::Ref<ResizeObserverSize>> m_content_box_size;
|
||||
Vector<GC::Ref<ResizeObserverSize>> m_border_box_size;
|
||||
Vector<GC::Ref<ResizeObserverSize>> m_device_pixel_content_box_size;
|
||||
|
||||
JS::GCPtr<Geometry::DOMRectReadOnly> m_content_rect;
|
||||
GC::Ptr<Geometry::DOMRectReadOnly> m_content_rect;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue