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
parent a14481ee05
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

@ -31,7 +31,7 @@ void HTMLSummaryElement::activation_behavior(DOM::Event const&)
return;
// 2. Let parent be this summary element's parent.
auto* parent = this->parent_element();
auto parent = this->parent_element();
// 3. If the open attribute is present on parent, then remove it. Otherwise, set parent's open attribute to the empty string.
if (parent->has_attribute(HTML::AttributeNames::open))
@ -50,7 +50,7 @@ bool HTMLSummaryElement::is_summary_for_its_parent_details()
return false;
// 2. Let parent be this summary element's parent.
auto* parent = this->parent_element();
auto parent = this->parent_element();
// 3. If parent is not a details element, then return false.
if (!is<HTMLDetailsElement>(*parent))