LibWeb: Call set_ongoing_navigation() on navigable instead of this

This fixes incorrectly implemented spec when `set_ongoing_navigation()`
is called on `this` (=traversable) instead of `navigable` variable.
This commit is contained in:
Aliaksandr Kalenik 2023-09-03 17:42:00 +02:00 committed by Andreas Kling
parent 799b465fac
commit d3d2e56a68
Notes: sideshowbarker 2024-07-16 22:18:54 +09:00

View file

@ -256,7 +256,7 @@ void TraversableNavigable::apply_the_history_step(int step, Optional<SourceSnaps
navigable->set_current_session_history_entry(target_entry);
// 3. Set navigable's ongoing navigation to "traversal".
set_ongoing_navigation(Traversal::Tag);
navigable->set_ongoing_navigation(Traversal::Tag);
}
// 9. Let totalChangeJobs be the size of changingNavigables.
@ -390,7 +390,7 @@ void TraversableNavigable::apply_the_history_step(int step, Optional<SourceSnaps
auto navigable = changing_navigable_continuation.navigable;
// 7. Set navigable's ongoing navigation to null.
set_ongoing_navigation({});
navigable->set_ongoing_navigation({});
// 8. Let (scriptHistoryLength, scriptHistoryIndex) be the result of getting the history object length and index given traversable and targetStep.
auto [script_history_length, script_history_index] = get_the_history_object_length_and_index(target_step);