diff options
author | Connor Brewster <brewsterc@my.caspercollege.edu> | 2016-06-07 22:09:45 -0600 |
---|---|---|
committer | Connor Brewster <connor.brewster@eagles.oc.edu> | 2016-07-21 20:51:38 -0600 |
commit | f13181876317c5d2e690dc4d0a5d10185eda1101 (patch) | |
tree | 070202b024ea55017ddb2ccc87d27eb44c9a9149 /components/script/dom/htmliframeelement.rs | |
parent | 4ae0897175143351439ff5b903d05a79c17e3725 (diff) | |
download | servo-f13181876317c5d2e690dc4d0a5d10185eda1101.tar.gz servo-f13181876317c5d2e690dc4d0a5d10185eda1101.zip |
Implement beginnings of joint session history
Fix backward navigation
make use of history iterator
Add frame iterator
add different back logic
cleanup navigation_info
Add extra explanation for iter logic
Remove forward history on full frame tree
Rename navigation to traversal where appropriate
check full tree for can go back/forward
simplify frame iter logic
remove FrameIterator
cleanup history iter
reduce amount of vec allocations
removed extra parenthesis
Remove history iterator
cleanup after rebasing
avoid recursive vec allocation
remove full_frame_tree
remove_forward_history_in_frame_tree -> clear_joint_session_future
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 14 |
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 |