diff options
Diffstat (limited to 'src/components/script/layout_interface.rs')
-rw-r--r-- | src/components/script/layout_interface.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/components/script/layout_interface.rs b/src/components/script/layout_interface.rs index c0b35ef6a3f..613e61a3429 100644 --- a/src/components/script/layout_interface.rs +++ b/src/components/script/layout_interface.rs @@ -122,9 +122,11 @@ pub struct Reflow { /// Encapsulates a channel to the layout task. #[deriving(Clone)] pub struct LayoutChan(SharedChan<Msg>); + impl LayoutChan { - pub fn new(chan: Chan<Msg>) -> LayoutChan { - LayoutChan(SharedChan::new(chan)) + pub fn new() -> (Port<Msg>, LayoutChan) { + let (port, chan) = SharedChan::new(); + (port, LayoutChan(chan)) } } |