mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -28,8 +28,8 @@ use webgpu::{wgc, WebGPU, WebGPUResponse};
|
|||
|
||||
use crate::{
|
||||
AnimationState, AuxiliaryBrowsingContextLoadInfo, BroadcastMsg, DocumentState,
|
||||
IFrameLoadInfoWithData, LoadData, MessagePortMsg, PortMessageTask, StructuredSerializedData,
|
||||
WindowSizeType, WorkerGlobalScopeInit, WorkerScriptLoadOrigin,
|
||||
IFrameLoadInfoWithData, LoadData, MessagePortMsg, NavigationHistoryBehavior, PortMessageTask,
|
||||
StructuredSerializedData, WindowSizeType, WorkerGlobalScopeInit, WorkerScriptLoadOrigin,
|
||||
};
|
||||
|
||||
/// An iframe sizing operation.
|
||||
|
@ -83,15 +83,6 @@ pub enum LogEntry {
|
|||
Warn(String),
|
||||
}
|
||||
|
||||
/// <https://html.spec.whatwg.org/multipage/#replacement-enabled>
|
||||
#[derive(Debug, Deserialize, Serialize)]
|
||||
pub enum HistoryEntryReplacement {
|
||||
/// Traverse the history with replacement enabled.
|
||||
Enabled,
|
||||
/// Traverse the history with replacement disabled.
|
||||
Disabled,
|
||||
}
|
||||
|
||||
/// Messages from the script to the constellation.
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub enum ScriptMsg {
|
||||
|
@ -181,7 +172,7 @@ pub enum ScriptMsg {
|
|||
LoadComplete,
|
||||
/// A new load has been requested, with an option to replace the current entry once loaded
|
||||
/// instead of adding a new entry.
|
||||
LoadUrl(LoadData, HistoryEntryReplacement),
|
||||
LoadUrl(LoadData, NavigationHistoryBehavior),
|
||||
/// Abort loading after sending a LoadUrl message.
|
||||
AbortLoadUrl,
|
||||
/// Post a message to the currently active window of a given browsing context.
|
||||
|
@ -199,7 +190,7 @@ pub enum ScriptMsg {
|
|||
data: StructuredSerializedData,
|
||||
},
|
||||
/// Inform the constellation that a fragment was navigated to and whether or not it was a replacement navigation.
|
||||
NavigatedToFragment(ServoUrl, HistoryEntryReplacement),
|
||||
NavigatedToFragment(ServoUrl, NavigationHistoryBehavior),
|
||||
/// HTMLIFrameElement Forward or Back traversal.
|
||||
TraverseHistory(TraversalDirection),
|
||||
/// Inform the constellation of a pushed history state.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue