mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 16:49:54 +00:00
LibWeb: Correct some faulty logic in 'apply the history step'
We were checking if the parent was _not_ null, and not checking for an auxiliary browsing context at all.
This commit is contained in:
parent
592cf556a1
commit
cde3545a51
Notes:
github-actions[bot]
2024-10-14 12:46:34 +00:00
Author: https://github.com/shannonbooth
Commit: cde3545a51
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1786
Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 2 additions and 2 deletions
|
@ -584,8 +584,8 @@ TraversableNavigable::HistoryStepResult TraversableNavigable::apply_the_history_
|
||||||
// - targetEntry's document's browsing context is not an auxiliary browsing context whose opener browsing context is non-null; and
|
// - targetEntry's document's browsing context is not an auxiliary browsing context whose opener browsing context is non-null; and
|
||||||
// - targetEntry's document's origin is not oldOrigin,
|
// - targetEntry's document's origin is not oldOrigin,
|
||||||
// then set targetEntry's document state's navigable target name to the empty string.
|
// then set targetEntry's document state's navigable target name to the empty string.
|
||||||
if (navigable->parent() != nullptr
|
if (navigable->parent() == nullptr
|
||||||
&& target_entry->document()->browsing_context()->opener_browsing_context() == nullptr
|
&& !(target_entry->document()->browsing_context()->is_auxiliary() && target_entry->document()->browsing_context()->opener_browsing_context() != nullptr)
|
||||||
&& target_entry->document_state()->origin() != old_origin) {
|
&& target_entry->document_state()->origin() != old_origin) {
|
||||||
target_entry->document_state()->set_navigable_target_name(String {});
|
target_entry->document_state()->set_navigable_target_name(String {});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue