diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-09-19 14:32:45 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-19 14:32:45 -0500 |
commit | 9876923b29ae7c4f2b763e368fc34fe8a051afc4 (patch) | |
tree | 6c7818483e8b876984e62305d3b04b34ca4b8345 /components/script_traits/lib.rs | |
parent | 0b0495cff4c0062f1def279c8079ca76c58aef23 (diff) | |
parent | e9b2f1b916754ac57ab06326f49b0f1de5e1e9c0 (diff) | |
download | servo-9876923b29ae7c4f2b763e368fc34fe8a051afc4.tar.gz servo-9876923b29ae7c4f2b763e368fc34fe8a051afc4.zip |
Auto merge of #13167 - ConnorGBrewster:reload_replace_current, r=asajeffrey
Replace current session entry when reloading
<!-- Please describe your changes on the following line: -->
This PR adds a replacement option when navigating. It replaces the current session history entry after a new page has been loaded. This will prevent reloading from adding a new entry to the session history.
---
<!-- 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 test-tidy` does not report any errors
- [X] These changes fix #13123 (github issue number if applicable).
<!-- Either: -->
- [X] There are tests for these changes OR
- [ ] These changes do not require tests because _____
<!-- 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/13167)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script_traits/lib.rs')
-rw-r--r-- | components/script_traits/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs index 19075c63a7d..c28942688e5 100644 --- a/components/script_traits/lib.rs +++ b/components/script_traits/lib.rs @@ -179,7 +179,7 @@ pub enum ConstellationControlMsg { NotifyVisibilityChange(PipelineId, PipelineId, bool), /// Notifies script thread that a url should be loaded in this iframe. /// First PipelineId is for the parent, second PipelineId is for the actual pipeline. - Navigate(PipelineId, PipelineId, LoadData), + Navigate(PipelineId, PipelineId, LoadData, bool), /// Requests the script thread forward a mozbrowser event to an iframe it owns, /// or to the window if no child pipeline id is provided. /// First PipelineId is for the parent, second PipelineId is for the actual pipeline. @@ -459,6 +459,9 @@ pub struct IFrameLoadInfo { pub is_private: bool, /// Whether this iframe is a mozbrowser iframe pub frame_type: FrameType, + /// Wether this load should replace the current entry (reload). If true, the current + /// entry will be replaced instead of a new entry being added. + pub replace: bool, } // https://developer.mozilla.org/en-US/docs/Web/API/Using_the_Browser_API#Events |