LibWeb: Make Node::parent_element return GC::Ptr

This is useful for people like myself who run with debug mode to
more reliably get stacktraces without spinning up a debugger.
This commit is contained in:
Shannon Booth 2025-04-18 14:19:19 +12:00 committed by Andreas Kling
commit 3e17b1c9ae
Notes: github-actions[bot] 2025-04-18 09:08:36 +00:00
18 changed files with 48 additions and 54 deletions

View file

@ -2051,7 +2051,7 @@ Optional<String> Node::locate_a_namespace(Optional<String> const& prefix) const
}
// 5. If its parent element is null, then return null.
auto* parent_element = element.parent_element();
auto parent_element = element.parent_element();
if (!element.parent_element())
return {};
@ -2090,7 +2090,7 @@ Optional<String> Node::locate_a_namespace(Optional<String> const& prefix) const
// Otherwise
// 1. If its parent element is null, then return null.
auto* parent_element = this->parent_element();
auto parent_element = this->parent_element();
if (!parent_element)
return {};
@ -2153,7 +2153,7 @@ Optional<String> Node::lookup_prefix(Optional<String> namespace_) const
// Otherwise
// Return the result of locating a namespace prefix for its parent element, if its parent element is non-null; otherwise null.
auto* parent_element = this->parent_element();
auto parent_element = this->parent_element();
if (!parent_element)
return {};