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:
Shannon Booth 2024-11-15 04:01:23 +13:00 committed by Andreas Kling
commit f87041bf3a
Notes: github-actions[bot] 2024-11-15 13:50:17 +00:00
1722 changed files with 9939 additions and 9906 deletions

View file

@ -25,7 +25,7 @@ class HTMLElement
, public HTML::GlobalEventHandlers
, public HTML::HTMLOrSVGElement<HTMLElement> {
WEB_PLATFORM_OBJECT(HTMLElement, DOM::Element);
JS_DECLARE_ALLOCATOR(HTMLElement);
GC_DECLARE_ALLOCATOR(HTMLElement);
public:
virtual ~HTMLElement() override;
@ -51,7 +51,7 @@ public:
int offset_left() const;
int offset_width() const;
int offset_height() const;
JS::GCPtr<Element> offset_parent() const;
GC::Ptr<Element> offset_parent() const;
bool cannot_navigate() const;
@ -64,14 +64,14 @@ public:
// https://html.spec.whatwg.org/multipage/forms.html#category-label
virtual bool is_labelable() const { return false; }
JS::GCPtr<DOM::NodeList> labels();
GC::Ptr<DOM::NodeList> labels();
virtual Optional<ARIA::Role> default_role() const override;
String get_an_elements_target() const;
TokenizedFeature::NoOpener get_an_elements_noopener(StringView target) const;
WebIDL::ExceptionOr<JS::NonnullGCPtr<ElementInternals>> attach_internals();
WebIDL::ExceptionOr<GC::Ref<ElementInternals>> attach_internals();
WebIDL::ExceptionOr<void> set_popover(Optional<String> value);
Optional<String> popover() const;
@ -93,17 +93,17 @@ private:
virtual void adjust_computed_style(CSS::StyleProperties&) override;
// ^HTML::GlobalEventHandlers
virtual JS::GCPtr<DOM::EventTarget> global_event_handlers_to_event_target(FlyString const&) override { return *this; }
virtual GC::Ptr<DOM::EventTarget> global_event_handlers_to_event_target(FlyString const&) override { return *this; }
virtual void did_receive_focus() override;
virtual void did_lose_focus() override;
[[nodiscard]] String get_the_text_steps();
JS::NonnullGCPtr<DOM::DocumentFragment> rendered_text_fragment(StringView input);
GC::Ref<DOM::DocumentFragment> rendered_text_fragment(StringView input);
JS::GCPtr<DOM::NodeList> m_labels;
GC::Ptr<DOM::NodeList> m_labels;
// https://html.spec.whatwg.org/multipage/custom-elements.html#attached-internals
JS::GCPtr<ElementInternals> m_attached_internals;
GC::Ptr<ElementInternals> m_attached_internals;
enum class ContentEditableState {
True,