diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp index ec76b90ae61..22024ef7895 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.cpp @@ -128,12 +128,12 @@ Optional HTMLAnchorElement::default_role() const } // https://html.spec.whatwg.org/multipage/text-level-semantics.html#dom-a-rellist -JS::GCPtr HTMLAnchorElement::rel_list() +JS::NonnullGCPtr HTMLAnchorElement::rel_list() { // The IDL attribute relList must reflect the rel content attribute. if (!m_rel_list) m_rel_list = DOM::DOMTokenList::create(*this, HTML::AttributeNames::rel); - return m_rel_list; + return *m_rel_list; } // https://html.spec.whatwg.org/multipage/text-level-semantics.html#dom-a-text diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h index 825a7b65eea..b8b8d60ae75 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLAnchorElement.h @@ -24,7 +24,7 @@ public: String target() const { return get_attribute_value(HTML::AttributeNames::target); } String download() const { return get_attribute_value(HTML::AttributeNames::download); } - JS::GCPtr rel_list(); + JS::NonnullGCPtr rel_list(); String text() const; void set_text(String const&); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp index b48a4b044f2..048d2ca3f3a 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.cpp @@ -39,12 +39,12 @@ void HTMLAreaElement::attribute_changed(FlyString const& name, Optional } // https://html.spec.whatwg.org/multipage/image-maps.html#dom-area-rellist -JS::GCPtr HTMLAreaElement::rel_list() +JS::NonnullGCPtr HTMLAreaElement::rel_list() { // The IDL attribute relList must reflect the rel content attribute. if (!m_rel_list) m_rel_list = DOM::DOMTokenList::create(*this, HTML::AttributeNames::rel); - return m_rel_list; + return *m_rel_list; } Optional HTMLAreaElement::hyperlink_element_utils_href() const diff --git a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h index 5f63b2b8d0b..45bfb61c740 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLAreaElement.h @@ -20,7 +20,7 @@ class HTMLAreaElement final public: virtual ~HTMLAreaElement() override; - JS::GCPtr rel_list(); + JS::NonnullGCPtr rel_list(); private: HTMLAreaElement(DOM::Document&, DOM::QualifiedName); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp index 78b71243805..fa23043fb69 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.cpp @@ -586,12 +586,12 @@ StringView HTMLFormElement::method() const } // https://html.spec.whatwg.org/multipage/forms.html#dom-form-rellist -JS::GCPtr HTMLFormElement::rel_list() +JS::NonnullGCPtr HTMLFormElement::rel_list() { // The relList IDL attribute must reflect the rel content attribute. if (!m_rel_list) m_rel_list = DOM::DOMTokenList::create(*this, HTML::AttributeNames::rel); - return m_rel_list; + return *m_rel_list; } // https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-fs-method diff --git a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.h b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.h index 0cc5052a981..7ab8b051000 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLFormElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLFormElement.h @@ -92,7 +92,7 @@ public: StringView method() const; WebIDL::ExceptionOr set_method(String const&); - JS::GCPtr rel_list(); + JS::NonnullGCPtr rel_list(); String action() const; WebIDL::ExceptionOr set_action(String const&); diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp index 88b6b70e32f..03e25f1cab4 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.cpp @@ -91,12 +91,12 @@ void HTMLLinkElement::inserted() } // https://html.spec.whatwg.org/multipage/semantics.html#dom-link-rellist -JS::GCPtr HTMLLinkElement::rel_list() +JS::NonnullGCPtr HTMLLinkElement::rel_list() { // The relList IDL attribute must reflect the rel content attribute. if (!m_rel_list) m_rel_list = DOM::DOMTokenList::create(*this, HTML::AttributeNames::rel); - return m_rel_list; + return *m_rel_list; } bool HTMLLinkElement::has_loaded_icon() const diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h index 4a876183c59..ddf2cfcddd1 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h +++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h @@ -34,7 +34,7 @@ public: String type() const { return get_attribute_value(HTML::AttributeNames::type); } String href() const { return get_attribute_value(HTML::AttributeNames::href); } - JS::GCPtr rel_list(); + JS::NonnullGCPtr rel_list(); bool has_loaded_icon() const; bool load_favicon_and_use_if_window_is_active();