aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorKeith Yeung <kungfukeith11@gmail.com>2016-04-25 19:16:55 -0400
committerKeith Yeung <kungfukeith11@gmail.com>2016-04-30 21:43:01 -0400
commit3110647852b0dec459414c0bebef61d89d156f64 (patch)
tree4059ee27433f02bd4219aca049b94892d0be6447 /components/script/dom/htmliframeelement.rs
parente1091128cd74d59b471d2016ed5542cda6741ac2 (diff)
downloadservo-3110647852b0dec459414c0bebef61d89d156f64.tar.gz
servo-3110647852b0dec459414c0bebef61d89d156f64.zip
Make IFrameLoadInfo take an Option<LoadData> instead of Option<Url>
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 89e7d6f89e8..bf3ff02487c 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -33,7 +33,7 @@ use ipc_channel::ipc;
use js::jsapi::{JSAutoCompartment, JSAutoRequest, RootedValue, JSContext, MutableHandleValue};
use js::jsval::{UndefinedValue, NullValue};
use layout_interface::ReflowQueryType;
-use msg::constellation_msg::{ConstellationChan};
+use msg::constellation_msg::{ConstellationChan, LoadData};
use msg::constellation_msg::{NavigationDirection, PipelineId, SubpageId};
use net_traits::response::HttpsState;
use page::IterablePage;
@@ -98,7 +98,7 @@ impl HTMLIFrameElement {
(subpage_id, old_subpage_id)
}
- pub fn navigate_or_reload_child_browsing_context(&self, url: Option<Url>) {
+ pub fn navigate_or_reload_child_browsing_context(&self, load_data: Option<LoadData>) {
let sandboxed = if self.is_sandboxed() {
IFrameSandboxed
} else {
@@ -115,8 +115,8 @@ impl HTMLIFrameElement {
//TODO(#9592): Deal with the case where an iframe is being reloaded so url is None.
// The iframe should always have access to the nested context's active
// document URL through the browsing context.
- if let Some(ref url) = url {
- *load_blocker = Some(LoadBlocker::new(&*document, LoadType::Subframe(url.clone())));
+ if let Some(ref load_data) = load_data {
+ *load_blocker = Some(LoadBlocker::new(&*document, LoadType::Subframe(load_data.url.clone())));
}
let window = window_from_node(self);
@@ -127,7 +127,7 @@ impl HTMLIFrameElement {
let ConstellationChan(ref chan) = *window.constellation_chan();
let load_info = IFrameLoadInfo {
- url: url,
+ load_data: load_data,
containing_pipeline_id: window.pipeline(),
new_subpage_id: new_subpage_id,
old_subpage_id: old_subpage_id,
@@ -149,7 +149,8 @@ impl HTMLIFrameElement {
None => Url::parse("about:blank").unwrap(),
};
- self.navigate_or_reload_child_browsing_context(Some(url));
+ // TODO - loaddata here should have referrer info (not None, None)
+ self.navigate_or_reload_child_browsing_context(Some(LoadData::new(url, None, None)));
}
#[allow(unsafe_code)]