diff --git a/components/compositing/compositor.rs b/components/compositing/compositor.rs index 5dfe85a4390..c7fc95d59a7 100644 --- a/components/compositing/compositor.rs +++ b/components/compositing/compositor.rs @@ -39,7 +39,7 @@ use msg::constellation_msg::{PipelineId, WindowSizeData}; use png; use profile_traits::mem::{self, Reporter, ReporterRequest, ReportKind}; use profile_traits::time::{self, ProfilerCategory, profile}; -use script_traits::{ConstellationControlMsg, LayoutControlMsg, ScriptControlChan}; +use script_traits::{ConstellationControlMsg, LayoutControlMsg}; use std::collections::HashMap; use std::collections::hash_map::Entry::{Occupied, Vacant}; use std::mem as std_mem; @@ -1278,8 +1278,7 @@ impl IOCompositor { let layer_rect = Rect::new(-layer.extra_data.borrow().scroll_offset.to_untyped(), layer.bounds.borrow().size.to_untyped()); let pipeline = self.get_pipeline(layer.pipeline_id()); - let ScriptControlChan(ref chan) = pipeline.script_chan; - chan.send(ConstellationControlMsg::Viewport(pipeline.id.clone(), layer_rect)).unwrap(); + pipeline.script_chan.send(ConstellationControlMsg::Viewport(pipeline.id.clone(), layer_rect)).unwrap(); } for kid in layer.children().iter() { diff --git a/components/compositing/compositor_layer.rs b/components/compositing/compositor_layer.rs index 71a21b0c9ba..0d3c27ab53f 100644 --- a/components/compositing/compositor_layer.rs +++ b/components/compositing/compositor_layer.rs @@ -14,7 +14,7 @@ use layers::color::Color; use layers::geometry::LayerPixel; use layers::layers::{Layer, LayerBufferSet}; use script_traits::CompositorEvent::{ClickEvent, MouseDownEvent, MouseMoveEvent, MouseUpEvent}; -use script_traits::{ScriptControlChan, ConstellationControlMsg}; +use script_traits::ConstellationControlMsg; use msg::compositor_msg::{Epoch, LayerId, LayerProperties, ScrollPolicy}; use msg::constellation_msg::PipelineId; use std::rc::Rc; @@ -360,8 +360,7 @@ impl CompositorLayer for Layer { }; let pipeline = compositor.get_pipeline(self.pipeline_id()); - let ScriptControlChan(ref chan) = pipeline.script_chan; - let _ = chan.send(ConstellationControlMsg::SendEvent(pipeline.id.clone(), message)); + let _ = pipeline.script_chan.send(ConstellationControlMsg::SendEvent(pipeline.id.clone(), message)); } fn send_mouse_move_event(&self, @@ -370,8 +369,7 @@ impl CompositorLayer for Layer { where Window: WindowMethods { let message = MouseMoveEvent(cursor.to_untyped()); let pipeline = compositor.get_pipeline(self.pipeline_id()); - let ScriptControlChan(ref chan) = pipeline.script_chan; - let _ = chan.send(ConstellationControlMsg::SendEvent(pipeline.id.clone(), message)); + let _ = pipeline.script_chan.send(ConstellationControlMsg::SendEvent(pipeline.id.clone(), message)); } fn scroll_layer_and_all_child_layers(&self, new_offset: TypedPoint2D) diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index ca3a6331b60..a854137f770 100644 --- a/components/compositing/pipeline.rs +++ b/components/compositing/pipeline.rs @@ -59,7 +59,7 @@ pub struct Pipeline { #[derive(Clone)] pub struct CompositionPipeline { pub id: PipelineId, - pub script_chan: ScriptControlChan, + pub script_chan: Sender, pub layout_chan: LayoutControlChan, pub chrome_to_paint_chan: Sender, } @@ -257,7 +257,7 @@ impl Pipeline { pub fn to_sendable(&self) -> CompositionPipeline { CompositionPipeline { id: self.id.clone(), - script_chan: self.script_chan.clone(), + script_chan: self.script_chan.0.clone(), layout_chan: self.layout_chan.clone(), chrome_to_paint_chan: self.chrome_to_paint_chan.clone(), }