diff --git a/components/compositing/pipeline.rs b/components/compositing/pipeline.rs index e61d597b4b5..cbd905ef00e 100644 --- a/components/compositing/pipeline.rs +++ b/components/compositing/pipeline.rs @@ -351,7 +351,7 @@ impl PipelineContent { self.pipeline_port.unwrap(), self.constellation_chan, self.failure, - self.script_chan.clone(), + self.script_chan.0.clone(), self.layout_to_paint_chan.clone(), self.image_cache_task, self.font_cache_task, diff --git a/components/layout/animation.rs b/components/layout/animation.rs index e8acb3b3229..a3f27267c00 100644 --- a/components/layout/animation.rs +++ b/components/layout/animation.rs @@ -12,7 +12,7 @@ use gfx::display_list::OpaqueNode; use layout_task::{LayoutTask, LayoutTaskData}; use msg::constellation_msg::{AnimationState, Msg, PipelineId}; use script::layout_interface::Animation; -use script_traits::{ConstellationControlMsg, ScriptControlChan}; +use script_traits::ConstellationControlMsg; use std::collections::HashMap; use std::collections::hash_map::Entry; use std::sync::Arc; @@ -128,7 +128,6 @@ pub fn recalc_style_for_animations(flow: &mut Flow, pub fn tick_all_animations(layout_task: &LayoutTask, rw_data: &mut LayoutTaskData) { layout_task.tick_animations(rw_data); - let ScriptControlChan(ref chan) = layout_task.script_chan; - chan.send(ConstellationControlMsg::TickAllAnimations(layout_task.id)).unwrap(); + layout_task.script_chan.send(ConstellationControlMsg::TickAllAnimations(layout_task.id)).unwrap(); } diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 3b3ae0e4009..80403c1dca3 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -59,7 +59,7 @@ use script::layout_interface::{LayoutChan, LayoutRPC, OffsetParentResponse}; use script::layout_interface::{NewLayoutTaskInfo, Msg, Reflow, ReflowGoal, ReflowQueryType}; use script::layout_interface::{ScriptLayoutChan, ScriptReflow, TrustedNodeAddress}; use script_traits::{ConstellationControlMsg, LayoutControlMsg, OpaqueScriptLayoutChannel}; -use script_traits::{ScriptControlChan, StylesheetLoadResponder}; +use script_traits::StylesheetLoadResponder; use selectors::parser::PseudoElement; use serde_json; use std::borrow::ToOwned; @@ -186,7 +186,7 @@ pub struct LayoutTask { pub constellation_chan: ConstellationChan, /// The channel on which messages can be sent to the script task. - pub script_chan: ScriptControlChan, + pub script_chan: Sender, /// The channel on which messages can be sent to the painting task. pub paint_chan: OptionalIpcSender, @@ -228,7 +228,7 @@ impl LayoutTaskFactory for LayoutTask { pipeline_port: IpcReceiver, constellation_chan: ConstellationChan, failure_msg: Failure, - script_chan: ScriptControlChan, + script_chan: Sender, paint_chan: OptionalIpcSender, image_cache_task: ImageCacheTask, font_cache_task: FontCacheTask, @@ -311,7 +311,7 @@ impl LayoutTask { chan: LayoutChan, pipeline_port: IpcReceiver, constellation_chan: ConstellationChan, - script_chan: ScriptControlChan, + script_chan: Sender, paint_chan: OptionalIpcSender, image_cache_task: ImageCacheTask, font_cache_task: FontCacheTask, @@ -645,7 +645,7 @@ impl LayoutTask { info.pipeline_port, info.constellation_chan, info.failure, - ScriptControlChan(info.script_chan.clone()), + info.script_chan.clone(), *info.paint_chan .downcast::>() .unwrap(), @@ -726,8 +726,7 @@ impl LayoutTask { Origin::Author); //TODO: mark critical subresources as blocking load as well (#5974) - let ScriptControlChan(ref chan) = self.script_chan; - chan.send(ConstellationControlMsg::StylesheetLoadComplete(self.id, url, responder)).unwrap(); + self.script_chan.send(ConstellationControlMsg::StylesheetLoadComplete(self.id, url, responder)).unwrap(); self.handle_add_stylesheet(sheet, mq, possibly_locked_rw_data); } diff --git a/components/layout_traits/lib.rs b/components/layout_traits/lib.rs index d75817911a7..16b3bdcda06 100644 --- a/components/layout_traits/lib.rs +++ b/components/layout_traits/lib.rs @@ -28,7 +28,7 @@ use msg::constellation_msg::{ConstellationChan, Failure, PipelineId}; use profile_traits::mem; use profile_traits::time; use net_traits::image_cache_task::ImageCacheTask; -use script_traits::{LayoutControlMsg, ScriptControlChan, OpaqueScriptLayoutChannel}; +use script_traits::{LayoutControlMsg, ConstellationControlMsg, OpaqueScriptLayoutChannel}; use std::sync::mpsc::Sender; use url::Url; use util::ipc::OptionalIpcSender; @@ -49,7 +49,7 @@ pub trait LayoutTaskFactory { pipeline_port: IpcReceiver, constellation_chan: ConstellationChan, failure_msg: Failure, - script_chan: ScriptControlChan, + script_chan: Sender, layout_to_paint_chan: OptionalIpcSender, image_cache_task: ImageCacheTask, font_cache_task: FontCacheTask,