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

@ -250,7 +250,7 @@ void HTMLOptionElement::removed_from(Node* old_parent, Node& old_root)
if (old_parent) {
if (is<HTMLSelectElement>(*old_parent))
static_cast<HTMLSelectElement&>(*old_parent).update_selectedness();
else if (is<HTMLOptGroupElement>(*old_parent) && old_parent->parent_element() && is<HTMLSelectElement>(old_parent->parent_element()))
else if (is<HTMLOptGroupElement>(*old_parent) && old_parent->parent_element() && is<HTMLSelectElement>(*old_parent->parent_element()))
static_cast<HTMLSelectElement&>(*old_parent->parent_element()).update_selectedness();
}
}