mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-21 23:20:20 +00:00
LibWeb: Fix missing auxiliary logic for cross document navigation
I noticed this missing check when trying to debug an unrelated issue. I don't know what it could fix, but this seems like an oversight.
This commit is contained in:
parent
00bc22c332
commit
b264d18ad1
Notes:
github-actions[bot]
2024-11-17 16:38:38 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/b264d18ad14 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2393 Reviewed-by: https://github.com/trflynn89 ✅
1 changed files with 4 additions and 1 deletions
|
@ -1875,8 +1875,11 @@ void finalize_a_cross_document_navigation(GC::Ref<Navigable> navigable, HistoryH
|
|||
// - historyEntry's document's browsing context is not an auxiliary browsing context whose opener browsing context is non-null; and
|
||||
// - historyEntry's document's origin is not navigable's active document's origin
|
||||
// then set historyEntry's document state's navigable target name to the empty string.
|
||||
if (navigable->parent() == nullptr && history_entry->document()->browsing_context()->opener_browsing_context() != nullptr && history_entry->document()->origin() != navigable->active_document()->origin())
|
||||
if (navigable->parent() == nullptr
|
||||
&& !(history_entry->document()->browsing_context()->is_auxiliary() && history_entry->document()->browsing_context()->opener_browsing_context() != nullptr)
|
||||
&& history_entry->document()->origin() != navigable->active_document()->origin()) {
|
||||
history_entry->document_state()->set_navigable_target_name(String {});
|
||||
}
|
||||
|
||||
// 5. Let entryToReplace be navigable's active session history entry if historyHandling is "replace", otherwise null.
|
||||
auto entry_to_replace = history_handling == HistoryHandlingBehavior::Replace ? navigable->active_session_history_entry() : nullptr;
|
||||
|
|
Loading…
Reference in a new issue