mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 07:41:01 +00:00
LibWeb: Update update_for_history_step_application
Update 'update_for_history_step_application' to meet some of the specs introduced in https://github.com/whatwg/html/pull/9856 and in https://github.com/whatwg/html/pull/9990
This commit is contained in:
parent
1039561280
commit
2497f43989
Notes:
github-actions[bot]
2024-07-22 08:40:39 +00:00
Author: https://github.com/mobounya
Commit: 2497f43989
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/757
Reviewed-by: https://github.com/kalenikaliaksandr ✅
4 changed files with 43 additions and 19 deletions
|
@ -710,7 +710,7 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_
|
|||
bool const update_only = changing_navigable_continuation->update_only;
|
||||
JS::GCPtr<SessionHistoryEntry> const target_entry = changing_navigable_continuation->target_entry;
|
||||
bool const populated_cloned_target_session_history_entry = changing_navigable_continuation->populated_cloned_target_session_history_entry;
|
||||
auto after_potential_unload = JS::create_heap_function(this->heap(), [navigable, update_only, target_entry, populated_target_entry, populated_cloned_target_session_history_entry, displayed_document, &completed_change_jobs, script_history_length, script_history_index, entries_for_navigation_api = move(entries_for_navigation_api), &heap = this->heap()] {
|
||||
auto after_potential_unload = JS::create_heap_function(this->heap(), [navigable, update_only, target_entry, populated_target_entry, populated_cloned_target_session_history_entry, displayed_document, &completed_change_jobs, script_history_length, script_history_index, entries_for_navigation_api = move(entries_for_navigation_api), &heap = this->heap(), navigation_type] {
|
||||
if (populated_cloned_target_session_history_entry) {
|
||||
target_entry->set_document_state(populated_target_entry->document_state());
|
||||
target_entry->set_url(populated_target_entry->url());
|
||||
|
@ -724,8 +724,8 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_
|
|||
// 2. Let updateDocument be an algorithm step which performs update document for history step application given
|
||||
// targetEntry's document, targetEntry, changingNavigableContinuation's update-only, scriptHistoryLength,
|
||||
// scriptHistoryIndex, navigationType, entriesForNavigationAPI, and displayedEntry.
|
||||
auto update_document = [script_history_length, script_history_index, entries_for_navigation_api = move(entries_for_navigation_api), target_entry, update_only] {
|
||||
target_entry->document()->update_for_history_step_application(*target_entry, update_only, script_history_length, script_history_index, entries_for_navigation_api);
|
||||
auto update_document = [script_history_length, script_history_index, entries_for_navigation_api = move(entries_for_navigation_api), target_entry, update_only, navigation_type] {
|
||||
target_entry->document()->update_for_history_step_application(*target_entry, update_only, script_history_length, script_history_index, navigation_type, entries_for_navigation_api);
|
||||
};
|
||||
|
||||
// 3. If targetEntry's document is equal to displayedDocument, then perform updateDocument.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue