mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 15:16:14 +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:
committed by
Alexander Kalenik
parent
adcc3905e5
commit
8cc2ee34db
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user