1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:38:11 +00:00

LibWeb: Align session history step application code with latest spec

Replaces direct "apply the history step" calls with new functions from
the spec:
- "update for navigable creation/destruction"
- "apply the push/replace history step"
- "apply the reload history step"
This commit is contained in:
Aliaksandr Kalenik 2023-09-03 22:20:32 +02:00 committed by Andreas Kling
parent d3d2e56a68
commit 2445205e9d
4 changed files with 39 additions and 15 deletions

View file

@ -1293,8 +1293,8 @@ void Navigable::reload()
// 3. Append the following session history traversal steps to traversable:
traversable->append_session_history_traversal_steps([traversable] {
// 1. Apply pending history changes to traversable with true.
traversable->apply_pending_history_changes();
// 1. Apply the reload history step to traversable.
traversable->apply_the_reload_history_step();
});
}
@ -1438,8 +1438,8 @@ void finalize_a_cross_document_navigation(JS::NonnullGCPtr<Navigable> navigable,
target_step = traversable->current_session_history_step();
}
// FIXME: 10. Apply the push/replace history step targetStep to traversable.
traversable->apply_the_history_step(target_step);
// 10. Apply the push/replace history step targetStep to traversable.
traversable->apply_the_push_or_replace_history_step(target_step);
}
// https://html.spec.whatwg.org/multipage/browsing-the-web.html#url-and-history-update-steps