LibWeb: Make shadow_including_first_ancestor_of_type() use the flat tree

Every user of this actually wants an ancestor in the flat tree - taking
things like `<slot>` into account. So rename it and adjust its behavior
to use that.
This commit is contained in:
Sam Atkins
2026-02-03 15:07:30 +00:00
committed by Jelle Raaijmakers
parent bd753eafb6
commit 2994a7532d
Notes: github-actions[bot] 2026-02-06 10:34:11 +00:00
8 changed files with 18 additions and 18 deletions

View File

@@ -585,7 +585,7 @@ GC::Ptr<HTMLDialogElement> HTMLDialogElement::nearest_clicked_dialog(UIEvents::P
return current_dialog;
// 2. Set currentNode to currentNode's parent in the flat tree.
current_node = current_node->shadow_including_first_ancestor_of_type<HTMLElement>();
current_node = current_node->first_flat_tree_ancestor_of_type<HTMLElement>();
}
// 5. Return null.