diff options
author | shanehandley <1322294+shanehandley@users.noreply.github.com> | 2024-12-18 23:47:20 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 12:47:20 +0000 |
commit | 3a4e5d4245d3d4a4c29a03fc50d78ed1eb0f0c67 (patch) | |
tree | d2492c8182421ab45c137f55d3004122167c7fe5 /components/shared/script/script_msg.rs | |
parent | 3cbc8c2442b18ad50a2e24dc3570101833677c28 (diff) | |
download | servo-3a4e5d4245d3d4a4c29a03fc50d78ed1eb0f0c67.tar.gz servo-3a4e5d4245d3d4a4c29a03fc50d78ed1eb0f0c67.zip |
Replace HistoryEntryReplacement with NavigationHistoryBehavior from the navigation API (#34681)
Signed-off-by: Shane Handley <shanehandley@fastmail.com>
Diffstat (limited to 'components/shared/script/script_msg.rs')
-rw-r--r-- | components/shared/script/script_msg.rs | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/components/shared/script/script_msg.rs b/components/shared/script/script_msg.rs index 9e51cf6d548..c391267643a 100644 --- a/components/shared/script/script_msg.rs +++ b/components/shared/script/script_msg.rs @@ -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. |