LibWeb: Flesh out apply the history step to setup the navigation API

We now populate the navigation history entries in the navigation API and
fire more navigation events as appropriate.
This commit is contained in:
Andrew Kaster 2023-09-27 22:59:57 -06:00 committed by Alexander Kalenik
commit 6c1944ee61
Notes: sideshowbarker 2024-07-16 22:34:39 +09:00
11 changed files with 339 additions and 78 deletions

View file

@ -1096,10 +1096,9 @@ bool Navigation::inner_navigate_event_firing_algorithm(
// 7. If navigationType is "push" or "replace", then run the URL and history update steps given document and
// event's destination's URL, with serialiedData set to event's classic history API state and historyHandling
// set to navigationType.
// FIXME: Pass the serialized data to this algorithm
if (navigation_type == Bindings::NavigationType::Push || navigation_type == Bindings::NavigationType::Replace) {
auto history_handling = navigation_type == Bindings::NavigationType::Push ? HistoryHandlingBehavior::Push : HistoryHandlingBehavior::Replace;
perform_url_and_history_update_steps(document, event->destination()->raw_url(), history_handling);
perform_url_and_history_update_steps(document, event->destination()->raw_url(), event->classic_history_api_state(), history_handling);
}
// Big spec note about reload here
}