LibWeb: Fix steps for finding a navigable by target name

This commit is contained in:
Psychpsyo 2025-02-14 18:34:48 +01:00 committed by Andreas Kling
parent d3c481f71a
commit 8f79f2137e
Notes: github-actions[bot] 2025-02-16 08:04:44 +00:00

View file

@ -518,7 +518,7 @@ GC::Ptr<Navigable> Navigable::find_a_navigable_by_target_name(StringView name)
auto subtrees_to_search = current_document.inclusive_ancestor_navigables();
// 4. For each subtreeToSearch of subtreesToSearch, in reverse order:
for (auto const& subtree_to_search : subtrees_to_search) {
for (auto const& subtree_to_search : subtrees_to_search.in_reverse()) {
// 1. Let documentToSearch be subtreeToSearch's active document.
auto& document_to_search = *subtree_to_search->active_document();