diff options
author | Josh Matthews <josh@joshmatthews.net> | 2014-04-24 13:03:19 -0400 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-05-03 14:18:31 -0400 |
commit | 91278da9dd55582401154e07f9eea34425a332c2 (patch) | |
tree | ccce9b42e8a6c54245e53620082efe0b9840eae1 /src/components/script/html/hubbub_html_parser.rs | |
parent | 46a33b4b38666252245af5dd3a38bb6f57ff8a8e (diff) | |
download | servo-91278da9dd55582401154e07f9eea34425a332c2.tar.gz servo-91278da9dd55582401154e07f9eea34425a332c2.zip |
Address review comments.
Diffstat (limited to 'src/components/script/html/hubbub_html_parser.rs')
-rw-r--r-- | src/components/script/html/hubbub_html_parser.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs index 452f1c8640b..8cebc7326e6 100644 --- a/src/components/script/html/hubbub_html_parser.rs +++ b/src/components/script/html/hubbub_html_parser.rs @@ -81,7 +81,7 @@ trait NodeWrapping<T> { impl<'a, T: NodeBase+Reflectable> NodeWrapping<T> for JSRef<'a, T> { unsafe fn to_hubbub_node(&self) -> hubbub::NodeDataPtr { - cast::transmute(self.get()) + cast::transmute(self.deref()) } } @@ -293,7 +293,6 @@ pub fn parse_html(page: &Page, let mut parser = hubbub::Parser("UTF-8", false); debug!("created parser"); - parser.set_document_node(unsafe { document.to_hubbub_node() }); parser.enable_scripting(true); parser.enable_styling(true); @@ -393,7 +392,7 @@ pub fn parse_html(page: &Page, let SubpageId(id_num) = subpage_id; *next_subpage_id.borrow_mut() = SubpageId(id_num + 1); - iframe_element.get_mut().size = Some(IFrameSize { + iframe_element.deref_mut().size = Some(IFrameSize { pipeline_id: pipeline_id, subpage_id: subpage_id, }); @@ -477,7 +476,7 @@ pub fn parse_html(page: &Page, match script.get_attribute(Null, "src").root() { Some(src) => { debug!("found script: {:s}", src.deref().Value()); - let new_url = parse_url(src.get().value_ref(), Some(url3.clone())); + let new_url = parse_url(src.deref().value_ref(), Some(url3.clone())); js_chan2.send(JSTaskNewFile(new_url)); } None => { @@ -487,7 +486,7 @@ pub fn parse_html(page: &Page, for child in scriptnode.children() { debug!("child = {:?}", child); let text: &JSRef<Text> = TextCast::to_ref(&child).unwrap(); - data.push(text.get().characterdata.data.to_str()); // FIXME: Bad copy. + data.push(text.deref().characterdata.data.to_str()); // FIXME: Bad copy. } debug!("script data = {:?}", data); |