aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-07-21 22:40:56 -0500
committerGitHub <noreply@github.com>2016-07-21 22:40:56 -0500
commit05cc76370f4f8dd5c715e42549a2027dc4c8ca71 (patch)
treea2637d9344829fd64e82035d48874cbeb6dc3d9f /components/script/dom
parent6064f31f1959fa877e96029eedf8723962a10311 (diff)
parentf13181876317c5d2e690dc4d0a5d10185eda1101 (diff)
downloadservo-05cc76370f4f8dd5c715e42549a2027dc4c8ca71.tar.gz
servo-05cc76370f4f8dd5c715e42549a2027dc4c8ca71.zip
Auto merge of #11866 - ConnorGBrewster:joint_session_history, r=asajeffrey
Implement joint session history <!-- Please describe your changes on the following line: --> This is cleaned up and should align with the patches on https://github.com/ConnorGBrewster/ServoNavigation/blob/master/notes/notes.pdf r? @asajeffrey --- <!-- 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 #11669 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [X] These changes do not require tests because this is not testable until the History API is added. <!-- 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="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11866) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/htmliframeelement.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index efd33eecf54..73d750cc8dd 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -38,7 +38,7 @@ use dom::window::{ReflowReason, Window};
use ipc_channel::ipc;
use js::jsapi::{JSAutoCompartment, JSContext, MutableHandleValue};
use js::jsval::{UndefinedValue, NullValue};
-use msg::constellation_msg::{FrameType, LoadData, NavigationDirection, PipelineId, SubpageId};
+use msg::constellation_msg::{FrameType, LoadData, TraversalDirection, PipelineId, SubpageId};
use net_traits::response::HttpsState;
use script_layout_interface::message::ReflowQueryType;
use script_traits::IFrameSandboxState::{IFrameSandboxed, IFrameUnsandboxed};
@@ -419,15 +419,11 @@ unsafe fn build_mozbrowser_event_detail(event: MozBrowserEvent,
}
}
-
-pub fn Navigate(iframe: &HTMLIFrameElement, direction: NavigationDirection) -> ErrorResult {
+pub fn Navigate(iframe: &HTMLIFrameElement, direction: TraversalDirection) -> ErrorResult {
if iframe.Mozbrowser() {
if iframe.upcast::<Node>().is_in_doc() {
let window = window_from_node(iframe);
-
- let pipeline_info = Some((window.pipeline(),
- iframe.subpage_id().unwrap()));
- let msg = ConstellationMsg::Navigate(pipeline_info, direction);
+ let msg = ConstellationMsg::TraverseHistory(iframe.pipeline(), direction);
window.constellation_chan().send(msg).unwrap();
}
@@ -500,12 +496,12 @@ impl HTMLIFrameElementMethods for HTMLIFrameElement {
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/goBack
fn GoBack(&self) -> ErrorResult {
- Navigate(self, NavigationDirection::Back(1))
+ Navigate(self, TraversalDirection::Back(1))
}
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/goForward
fn GoForward(&self) -> ErrorResult {
- Navigate(self, NavigationDirection::Forward(1))
+ Navigate(self, TraversalDirection::Forward(1))
}
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/reload