mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-31 07:22:50 +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
|
@ -12,7 +12,7 @@ namespace Web::DOM {
|
|||
|
||||
class ParentNode : public Node {
|
||||
WEB_PLATFORM_OBJECT(ParentNode, Node);
|
||||
JS_DECLARE_ALLOCATOR(ParentNode);
|
||||
GC_DECLARE_ALLOCATOR(ParentNode);
|
||||
|
||||
public:
|
||||
template<typename F>
|
||||
|
@ -20,23 +20,23 @@ public:
|
|||
template<typename F>
|
||||
void for_each_child(F);
|
||||
|
||||
JS::GCPtr<Element> first_element_child();
|
||||
JS::GCPtr<Element> last_element_child();
|
||||
GC::Ptr<Element> first_element_child();
|
||||
GC::Ptr<Element> last_element_child();
|
||||
u32 child_element_count() const;
|
||||
|
||||
WebIDL::ExceptionOr<JS::GCPtr<Element>> query_selector(StringView);
|
||||
WebIDL::ExceptionOr<JS::NonnullGCPtr<NodeList>> query_selector_all(StringView);
|
||||
WebIDL::ExceptionOr<GC::Ptr<Element>> query_selector(StringView);
|
||||
WebIDL::ExceptionOr<GC::Ref<NodeList>> query_selector_all(StringView);
|
||||
|
||||
JS::NonnullGCPtr<HTMLCollection> children();
|
||||
GC::Ref<HTMLCollection> children();
|
||||
|
||||
JS::NonnullGCPtr<HTMLCollection> get_elements_by_tag_name(FlyString const&);
|
||||
JS::NonnullGCPtr<HTMLCollection> get_elements_by_tag_name_ns(Optional<FlyString>, FlyString const&);
|
||||
GC::Ref<HTMLCollection> get_elements_by_tag_name(FlyString const&);
|
||||
GC::Ref<HTMLCollection> get_elements_by_tag_name_ns(Optional<FlyString>, FlyString const&);
|
||||
|
||||
WebIDL::ExceptionOr<void> prepend(Vector<Variant<JS::Handle<Node>, String>> const& nodes);
|
||||
WebIDL::ExceptionOr<void> append(Vector<Variant<JS::Handle<Node>, String>> const& nodes);
|
||||
WebIDL::ExceptionOr<void> replace_children(Vector<Variant<JS::Handle<Node>, String>> const& nodes);
|
||||
WebIDL::ExceptionOr<void> prepend(Vector<Variant<GC::Root<Node>, String>> const& nodes);
|
||||
WebIDL::ExceptionOr<void> append(Vector<Variant<GC::Root<Node>, String>> const& nodes);
|
||||
WebIDL::ExceptionOr<void> replace_children(Vector<Variant<GC::Root<Node>, String>> const& nodes);
|
||||
|
||||
JS::NonnullGCPtr<HTMLCollection> get_elements_by_class_name(StringView);
|
||||
GC::Ref<HTMLCollection> get_elements_by_class_name(StringView);
|
||||
|
||||
protected:
|
||||
ParentNode(JS::Realm& realm, Document& document, NodeType type)
|
||||
|
@ -52,7 +52,7 @@ protected:
|
|||
virtual void visit_edges(Cell::Visitor&) override;
|
||||
|
||||
private:
|
||||
JS::GCPtr<HTMLCollection> m_children;
|
||||
GC::Ptr<HTMLCollection> m_children;
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue