Remove the LayoutChan type.

It is a pointless abstraction.
This commit is contained in:
Ms2ger 2016-05-25 09:23:57 +02:00
parent 2f9796fa69
commit e94f3d4fe0
8 changed files with 26 additions and 45 deletions

View file

@ -18,7 +18,7 @@ use profile_traits::mem::ReportsChan;
use script_traits::UntrustedNodeAddress;
use script_traits::{ConstellationControlMsg, LayoutControlMsg, LayoutMsg as ConstellationMsg};
use std::sync::Arc;
use std::sync::mpsc::{Receiver, Sender, channel};
use std::sync::mpsc::{Receiver, Sender};
use string_cache::Atom;
use style::context::ReflowGoal;
use style::properties::longhands::{margin_top, margin_right, margin_bottom, margin_left, overflow_x};
@ -218,17 +218,6 @@ impl Drop for ScriptReflow {
}
}
/// Encapsulates a channel to the layout thread.
#[derive(Clone)]
pub struct LayoutChan(pub Sender<Msg>);
impl LayoutChan {
pub fn new() -> (Receiver<Msg>, LayoutChan) {
let (chan, port) = channel();
(port, LayoutChan(chan))
}
}
pub struct NewLayoutThreadInfo {
pub id: PipelineId,
pub url: Url,