Auto merge of #20671 - cbrewster:history_url, r=asajeffrey

Make session history aware of URLs

<!-- Please describe your changes on the following line: -->

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [X] `./mach build -d` does not report any errors
- [X] `./mach build-geckolib` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [x] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20671)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-04-30 13:33:23 -04:00 committed by GitHub
commit 847115ba04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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