Make session history aware of URLs

This commit is contained in:
Connor Brewster 2018-04-20 22:44:59 -05:00
parent 05fe8fa08d
commit e7ef9cfb30
11 changed files with 192 additions and 56 deletions

View file

@ -289,8 +289,8 @@ pub enum ConstellationControlMsg {
/// Updates the current pipeline ID of a given iframe.
/// First PipelineId is for the parent, second is the new PipelineId for the frame.
UpdatePipelineId(PipelineId, BrowsingContextId, PipelineId, UpdatePipelineIdReason),
/// Updates the history state of a given pipeline.
UpdateHistoryStateId(PipelineId, Option<HistoryStateId>),
/// Updates the history state and url of a given pipeline.
UpdateHistoryState(PipelineId, Option<HistoryStateId>, ServoUrl),
/// Removes inaccesible history states.
RemoveHistoryStates(PipelineId, Vec<HistoryStateId>),
/// Set an iframe to be focused. Used when an element in an iframe gains focus.
@ -347,7 +347,7 @@ impl fmt::Debug for ConstellationControlMsg {
Navigate(..) => "Navigate",
PostMessage(..) => "PostMessage",
UpdatePipelineId(..) => "UpdatePipelineId",
UpdateHistoryStateId(..) => "UpdateHistoryStateId",
UpdateHistoryState(..) => "UpdateHistoryState",
RemoveHistoryStates(..) => "RemoveHistoryStates",
FocusIFrame(..) => "FocusIFrame",
WebDriverScriptCommand(..) => "WebDriverScriptCommand",

View file

@ -105,9 +105,9 @@ pub enum ScriptMsg {
/// HTMLIFrameElement Forward or Back traversal.
TraverseHistory(TraversalDirection),
/// Inform the constellation of a pushed history state.
PushHistoryState(HistoryStateId),
PushHistoryState(HistoryStateId, ServoUrl),
/// Inform the constellation of a replaced history state.
ReplaceHistoryState(HistoryStateId),
ReplaceHistoryState(HistoryStateId, ServoUrl),
/// Gets the length of the joint session history from the constellation.
JointSessionHistoryLength(IpcSender<u32>),
/// Favicon detected