aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmliframeelement.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-10-07 07:52:09 -0500
committerGitHub <noreply@github.com>2016-10-07 07:52:09 -0500
commita6e4b5bb86ad707a0863acff87344ca4239cfd2c (patch)
treec820d9f2420c44cdfe29de97f1a710e7dc354bb7 /components/script/dom/htmliframeelement.rs
parente23959a7618e8e7b7ca20300a2afeb1ac77712f3 (diff)
parentd8e92bb271a9f9dd87bf77e38cd820d01f2f0ae4 (diff)
downloadservo-a6e4b5bb86ad707a0863acff87344ca4239cfd2c.tar.gz
servo-a6e4b5bb86ad707a0863acff87344ca4239cfd2c.zip
Auto merge of #13596 - nox:inline, r=Ms2ger
Get rid of dom::bindings::global Globals in that PR are now represented by the fake IDL interface `GlobalScope`. <!-- 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/13596) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r--components/script/dom/htmliframeelement.rs16
1 files changed, 9 insertions, 7 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 1503ff28e06..75d828e73c9 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -18,7 +18,6 @@ use dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElemen
use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use dom::bindings::conversions::ToJSValConvertible;
use dom::bindings::error::{Error, ErrorResult, Fallible};
-use dom::bindings::global::GlobalRef;
use dom::bindings::inheritance::Castable;
use dom::bindings::js::{JS, LayoutJS, MutNullableHeap, Root};
use dom::bindings::reflector::Reflectable;
@@ -30,6 +29,7 @@ use dom::domtokenlist::DOMTokenList;
use dom::element::{AttributeMutation, Element, RawLayoutElementHelpers};
use dom::event::Event;
use dom::eventtarget::EventTarget;
+use dom::globalscope::GlobalScope;
use dom::htmlelement::HTMLElement;
use dom::node::{Node, NodeDamage, UnbindContext, document_from_node, window_from_node};
use dom::urlhelper::UrlHelper;
@@ -126,9 +126,10 @@ impl HTMLIFrameElement {
let private_iframe = self.privatebrowsing();
let frame_type = if self.Mozbrowser() { FrameType::MozBrowserIFrame } else { FrameType::IFrame };
+ let global_scope = window.upcast::<GlobalScope>();
let load_info = IFrameLoadInfo {
load_data: load_data,
- parent_pipeline_id: window.pipeline_id(),
+ parent_pipeline_id: global_scope.pipeline_id(),
old_pipeline_id: old_pipeline_id,
new_pipeline_id: new_pipeline_id,
sandbox: sandboxed,
@@ -136,7 +137,8 @@ impl HTMLIFrameElement {
frame_type: frame_type,
replace: replace,
};
- window.constellation_chan()
+ global_scope
+ .constellation_chan()
.send(ConstellationMsg::ScriptLoadedURLInIFrame(load_info))
.unwrap();
@@ -217,7 +219,7 @@ impl HTMLIFrameElement {
let window = window_from_node(self);
let window = window.r();
let msg = ConstellationMsg::SetVisible(pipeline_id, visible);
- window.constellation_chan().send(msg).unwrap();
+ window.upcast::<GlobalScope>().constellation_chan().send(msg).unwrap();
}
}
@@ -316,7 +318,7 @@ pub fn build_mozbrowser_custom_event(window: &Window, event: MozBrowserEvent) ->
rooted!(in(cx) let mut detail = UndefinedValue());
let event_name = Atom::from(event.name());
unsafe { build_mozbrowser_event_detail(event, cx, detail.handle_mut()); }
- CustomEvent::new(GlobalRef::Window(window),
+ CustomEvent::new(window.upcast(),
event_name,
true,
true,
@@ -408,7 +410,7 @@ pub fn Navigate(iframe: &HTMLIFrameElement, direction: TraversalDirection) -> Er
if iframe.upcast::<Node>().is_in_doc() {
let window = window_from_node(iframe);
let msg = ConstellationMsg::TraverseHistory(iframe.pipeline_id(), direction);
- window.constellation_chan().send(msg).unwrap();
+ window.upcast::<GlobalScope>().constellation_chan().send(msg).unwrap();
}
Ok(())
@@ -642,7 +644,7 @@ impl VirtualMethods for HTMLIFrameElement {
(Some(sender), Some(receiver))
};
let msg = ConstellationMsg::RemoveIFrame(pipeline_id, sender);
- window.constellation_chan().send(msg).unwrap();
+ window.upcast::<GlobalScope>().constellation_chan().send(msg).unwrap();
if let Some(receiver) = receiver {
receiver.recv().unwrap()
}