mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Replace HistoryEntryReplacement with NavigationHistoryBehavior from the navigation API (#34681)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
This commit is contained in:
parent
3cbc8c2442
commit
3a4e5d4245
11 changed files with 127 additions and 108 deletions
|
@ -31,8 +31,8 @@ use js::JSCLASS_IS_GLOBAL;
|
|||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use net_traits::request::Referrer;
|
||||
use script_traits::{
|
||||
AuxiliaryBrowsingContextLoadInfo, HistoryEntryReplacement, LoadData, LoadOrigin, NewLayoutInfo,
|
||||
ScriptMsg,
|
||||
AuxiliaryBrowsingContextLoadInfo, LoadData, LoadOrigin, NavigationHistoryBehavior,
|
||||
NewLayoutInfo, ScriptMsg,
|
||||
};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::{ImmutableOrigin, ServoUrl};
|
||||
|
@ -526,12 +526,13 @@ impl WindowProxy {
|
|||
referrer_policy,
|
||||
Some(secure),
|
||||
);
|
||||
let replacement_flag = if new {
|
||||
HistoryEntryReplacement::Enabled
|
||||
let history_handling = if new {
|
||||
NavigationHistoryBehavior::Replace
|
||||
} else {
|
||||
HistoryEntryReplacement::Disabled
|
||||
NavigationHistoryBehavior::Push
|
||||
};
|
||||
target_window.load_url(replacement_flag, false, load_data, can_gc);
|
||||
|
||||
target_window.load_url(history_handling, false, load_data, can_gc);
|
||||
}
|
||||
if noopener {
|
||||
// Step 15 (Dis-owning has been done in create_auxiliary_browsing_context).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue