diff options
author | Tim Kuehn <tkuehn@cmu.edu> | 2013-06-26 22:42:01 -0700 |
---|---|---|
committer | Tim Kuehn <tkuehn@cmu.edu> | 2013-07-01 11:03:31 -0700 |
commit | fba7ec423c99a63bdcbe16029740e7ab4e38c088 (patch) | |
tree | 0e8a15014ee5bbf912153e8072c0a5505d3b4ecc /src/components/script/html/hubbub_html_parser.rs | |
parent | fdb0d820a49fac9ae2df623751912adcbe7a119d (diff) | |
download | servo-fba7ec423c99a63bdcbe16029740e7ab4e38c088.tar.gz servo-fba7ec423c99a63bdcbe16029740e7ab4e38c088.zip |
add pipeline.rs, modularized pipelines communicating with constellation
Diffstat (limited to 'src/components/script/html/hubbub_html_parser.rs')
-rw-r--r-- | src/components/script/html/hubbub_html_parser.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs index 6309e488d7e..9540fcc87d4 100644 --- a/src/components/script/html/hubbub_html_parser.rs +++ b/src/components/script/html/hubbub_html_parser.rs @@ -303,9 +303,9 @@ pub fn parse_html(url: Url, // Handle CSS style sheets from <link> elements ElementNodeTypeId(HTMLLinkElementTypeId) => { do node.with_imm_element |element| { - match (element.get_attr(~"rel"), element.get_attr(~"href")) { + match (element.get_attr("rel"), element.get_attr("href")) { (Some(rel), Some(href)) => { - if rel == ~"stylesheet" { + if rel == "stylesheet" { debug!("found CSS stylesheet: %s", href); let url = make_url(href.to_str(), Some(url2.clone())); css_chan2.send(CSSTaskNewFile(UrlProvenance(url))); @@ -317,7 +317,7 @@ pub fn parse_html(url: Url, }, ElementNodeTypeId(HTMLImageElementTypeId) => { do node.with_mut_image_element |image_element| { - let src_opt = image_element.parent.get_attr(~"src").map(|x| x.to_str()); + let src_opt = image_element.parent.get_attr("src").map(|x| x.to_str()); match src_opt { None => {} Some(src) => { @@ -401,7 +401,7 @@ pub fn parse_html(url: Url, unsafe { let script: AbstractNode<ScriptView> = NodeWrapping::from_hubbub_node(script); do script.with_imm_element |script| { - match script.get_attr(~"src") { + match script.get_attr("src") { Some(src) => { debug!("found script: %s", src); let new_url = make_url(src.to_str(), Some(url.clone())); |