diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-01 04:15:47 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-10-06 20:59:12 +0200 |
commit | f789e73fd2cf3d88d4447978a82ac6d629a1edf4 (patch) | |
tree | d600730e878907d18dcc255148d410606fbc8697 /components/script/dom/htmliframeelement.rs | |
parent | ae3763e7b35fd4836d28b396ef4fa8abda0912d1 (diff) | |
download | servo-f789e73fd2cf3d88d4447978a82ac6d629a1edf4.tar.gz servo-f789e73fd2cf3d88d4447978a82ac6d629a1edf4.zip |
Introduce GlobalScope::constellation_chan
Diffstat (limited to 'components/script/dom/htmliframeelement.rs')
-rw-r--r-- | components/script/dom/htmliframeelement.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs index 2b7781dae1e..355c825429d 100644 --- a/components/script/dom/htmliframeelement.rs +++ b/components/script/dom/htmliframeelement.rs @@ -29,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; @@ -135,7 +136,8 @@ impl HTMLIFrameElement { frame_type: frame_type, replace: replace, }; - window.constellation_chan() + window.upcast::<GlobalScope>() + .constellation_chan() .send(ConstellationMsg::ScriptLoadedURLInIFrame(load_info)) .unwrap(); @@ -216,7 +218,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(); } } @@ -407,7 +409,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(()) @@ -641,7 +643,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() } |