mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-01 22:51:55 +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,22 +14,22 @@ namespace Web::DOM {
|
|||
// https://dom.spec.whatwg.org/#nodeiterator
|
||||
class NodeIterator final : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(NodeIterator, Bindings::PlatformObject);
|
||||
JS_DECLARE_ALLOCATOR(NodeIterator);
|
||||
GC_DECLARE_ALLOCATOR(NodeIterator);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<JS::NonnullGCPtr<NodeIterator>> create(Node& root, unsigned what_to_show, JS::GCPtr<NodeFilter>);
|
||||
static WebIDL::ExceptionOr<GC::Ref<NodeIterator>> create(Node& root, unsigned what_to_show, GC::Ptr<NodeFilter>);
|
||||
|
||||
virtual ~NodeIterator() override;
|
||||
|
||||
JS::NonnullGCPtr<Node> root() { return m_root; }
|
||||
JS::NonnullGCPtr<Node> reference_node() { return m_reference.node; }
|
||||
GC::Ref<Node> root() { return m_root; }
|
||||
GC::Ref<Node> reference_node() { return m_reference.node; }
|
||||
bool pointer_before_reference_node() const { return m_reference.is_before_node; }
|
||||
unsigned what_to_show() const { return m_what_to_show; }
|
||||
|
||||
NodeFilter* filter() { return m_filter.ptr(); }
|
||||
|
||||
JS::ThrowCompletionOr<JS::GCPtr<Node>> next_node();
|
||||
JS::ThrowCompletionOr<JS::GCPtr<Node>> previous_node();
|
||||
JS::ThrowCompletionOr<GC::Ptr<Node>> next_node();
|
||||
JS::ThrowCompletionOr<GC::Ptr<Node>> previous_node();
|
||||
|
||||
void detach();
|
||||
|
||||
|
@ -47,15 +47,15 @@ private:
|
|||
Previous,
|
||||
};
|
||||
|
||||
JS::ThrowCompletionOr<JS::GCPtr<Node>> traverse(Direction);
|
||||
JS::ThrowCompletionOr<GC::Ptr<Node>> traverse(Direction);
|
||||
|
||||
JS::ThrowCompletionOr<NodeFilter::Result> filter(Node&);
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-traversal-root
|
||||
JS::NonnullGCPtr<Node> m_root;
|
||||
GC::Ref<Node> m_root;
|
||||
|
||||
struct NodePointer {
|
||||
JS::NonnullGCPtr<Node> node;
|
||||
GC::Ref<Node> node;
|
||||
|
||||
// https://dom.spec.whatwg.org/#nodeiterator-pointer-before-reference
|
||||
bool is_before_node { true };
|
||||
|
@ -74,7 +74,7 @@ private:
|
|||
unsigned m_what_to_show { 0 };
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-traversal-filter
|
||||
JS::GCPtr<NodeFilter> m_filter;
|
||||
GC::Ptr<NodeFilter> m_filter;
|
||||
|
||||
// https://dom.spec.whatwg.org/#concept-traversal-active
|
||||
bool m_active { false };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue