mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-24 11:11:51 +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
|
@ -8,24 +8,24 @@
|
|||
|
||||
#include <AK/JsonObjectSerializer.h>
|
||||
#include <AK/Vector.h>
|
||||
#include <LibGC/CellAllocator.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Heap/CellAllocator.h>
|
||||
#include <LibWeb/DOM/Node.h>
|
||||
#include <LibWeb/Forward.h>
|
||||
|
||||
namespace Web::DOM {
|
||||
|
||||
class AccessibilityTreeNode final : public JS::Cell {
|
||||
JS_CELL(AccessibilityTreeNode, JS::Cell);
|
||||
JS_DECLARE_ALLOCATOR(AccessibilityTreeNode);
|
||||
GC_CELL(AccessibilityTreeNode, JS::Cell);
|
||||
GC_DECLARE_ALLOCATOR(AccessibilityTreeNode);
|
||||
|
||||
public:
|
||||
static JS::NonnullGCPtr<AccessibilityTreeNode> create(Document*, DOM::Node const*);
|
||||
static GC::Ref<AccessibilityTreeNode> create(Document*, DOM::Node const*);
|
||||
virtual ~AccessibilityTreeNode() override = default;
|
||||
|
||||
JS::GCPtr<DOM::Node const> value() const { return m_value; }
|
||||
void set_value(JS::GCPtr<DOM::Node const> value) { m_value = value; }
|
||||
Vector<JS::GCPtr<AccessibilityTreeNode>> children() const { return m_children; }
|
||||
GC::Ptr<DOM::Node const> value() const { return m_value; }
|
||||
void set_value(GC::Ptr<DOM::Node const> value) { m_value = value; }
|
||||
Vector<GC::Ptr<AccessibilityTreeNode>> children() const { return m_children; }
|
||||
void append_child(AccessibilityTreeNode* child) { m_children.append(child); }
|
||||
|
||||
void serialize_tree_as_json(JsonObjectSerializer<StringBuilder>& object, Document const&) const;
|
||||
|
@ -34,10 +34,10 @@ protected:
|
|||
virtual void visit_edges(Visitor&) override;
|
||||
|
||||
private:
|
||||
explicit AccessibilityTreeNode(JS::GCPtr<DOM::Node const>);
|
||||
explicit AccessibilityTreeNode(GC::Ptr<DOM::Node const>);
|
||||
|
||||
JS::GCPtr<DOM::Node const> m_value;
|
||||
Vector<JS::GCPtr<AccessibilityTreeNode>> m_children;
|
||||
GC::Ptr<DOM::Node const> m_value;
|
||||
Vector<GC::Ptr<AccessibilityTreeNode>> m_children;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue