Use spec-aligned process for resolving history handling during navigation (#34747)

Makes use of the is_initial_about_blank property on Document in order to
determine whether the navigation should create a history entry, or replace
the current history entry.

Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
shanehandley 2024-12-27 13:45:53 +11:00 committed by GitHub
parent 398bafa25d
commit 08a3e61bb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 86 additions and 49 deletions

View file

@ -3134,6 +3134,8 @@ impl ScriptThread {
.as_ref()
.map(|referrer| referrer.clone().into_string());
let is_initial_about_blank = final_url.as_str() == "about:blank";
let document = Document::new(
&window,
HasBrowsingContext::Yes,
@ -3148,6 +3150,7 @@ impl ScriptThread {
referrer,
Some(metadata.status.raw_code()),
incomplete.canceller,
is_initial_about_blank,
can_gc,
);