diff options
Diffstat (limited to 'src/components/script/html/cssparse.rs')
-rw-r--r-- | src/components/script/html/cssparse.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/script/html/cssparse.rs b/src/components/script/html/cssparse.rs index 846af813461..c5cad0849de 100644 --- a/src/components/script/html/cssparse.rs +++ b/src/components/script/html/cssparse.rs @@ -4,13 +4,13 @@ /// Some little helpers for hooking up the HTML parser with the CSS parser. -use std::comm::Port; +use std::comm::{channel, Receiver}; use encoding::EncodingRef; use encoding::all::UTF_8; use style::Stylesheet; use servo_net::resource_task::{Load, LoadResponse, ProgressMsg, Payload, Done, ResourceTask}; use servo_util::task::spawn_named; -use extra::url::Url; +use url::Url; /// Where a style sheet comes from. pub enum StylesheetProvenance { @@ -20,8 +20,8 @@ pub enum StylesheetProvenance { pub fn spawn_css_parser(provenance: StylesheetProvenance, resource_task: ResourceTask) - -> Port<Stylesheet> { - let (result_port, result_chan) = Chan::new(); + -> Receiver<Stylesheet> { + let (result_chan, result_port) = channel(); // TODO: Get the actual value. http://dev.w3.org/csswg/css-syntax/#environment-encoding let environment_encoding = UTF_8 as EncodingRef; @@ -30,7 +30,7 @@ pub fn spawn_css_parser(provenance: StylesheetProvenance, let sheet = match provenance { UrlProvenance(url) => { debug!("cssparse: loading style sheet at {:s}", url.to_str()); - let (input_port, input_chan) = Chan::new(); + let (input_chan, input_port) = channel(); resource_task.send(Load(url, input_chan)); let LoadResponse { metadata: metadata, progress_port: progress_port } = input_port.recv(); @@ -52,7 +52,7 @@ pub fn spawn_css_parser(provenance: StylesheetProvenance, } struct ProgressMsgPortIterator { - progress_port: Port<ProgressMsg> + progress_port: Receiver<ProgressMsg> } impl Iterator<~[u8]> for ProgressMsgPortIterator { |