mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-17 06:52:23 +00:00
LibWeb: Check if entryToReplace is contained in session history entries
This small hack will allow us to get rid of "force processing of session history traversal queue" which is significantly more cumbersome hack.
This commit is contained in:
parent
adcc3905e5
commit
8cc2ee34db
Notes:
sideshowbarker
2024-07-17 01:46:00 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 8cc2ee34db
Pull-request: https://github.com/SerenityOS/serenity/pull/23853
1 changed files with 3 additions and 1 deletions
|
@ -1011,7 +1011,9 @@ void finalize_a_same_document_navigation(JS::NonnullGCPtr<TraversableNavigable>
|
|||
auto& target_entries = target_navigable->get_session_history_entries();
|
||||
|
||||
// 5. If entryToReplace is null, then:
|
||||
if (!entry_to_replace) {
|
||||
// FIXME: Checking containment of entryToReplace should not be needed.
|
||||
// For more details see https://github.com/whatwg/html/issues/10232#issuecomment-2037543137
|
||||
if (!entry_to_replace || !target_entries.contains_slow(JS::NonnullGCPtr { *entry_to_replace })) {
|
||||
// 1. Clear the forward session history of traversable.
|
||||
traversable->clear_the_forward_session_history();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue