mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02:00
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:
committed by
Jelle Raaijmakers
parent
bd753eafb6
commit
2994a7532d
Notes:
github-actions[bot]
2026-02-06 10:34:11 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/2994a7532d1 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7745 Reviewed-by: https://github.com/gmta ✅
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user