diff --git a/src/components/script/dom/node.rs b/src/components/script/dom/node.rs index e2716bfca83..e797adb3e12 100644 --- a/src/components/script/dom/node.rs +++ b/src/components/script/dom/node.rs @@ -410,11 +410,12 @@ impl<'self, View> AbstractNode { impl Iterator> for AbstractNodeChildrenIterator { pub fn next(&mut self) -> Option> { + let node = self.current_node; self.current_node = match self.current_node { None => None, Some(node) => node.next_sibling(), }; - self.current_node + node } } diff --git a/src/components/script/html/hubbub_html_parser.rs b/src/components/script/html/hubbub_html_parser.rs index d9dd9cc5636..ab8a8956314 100644 --- a/src/components/script/html/hubbub_html_parser.rs +++ b/src/components/script/html/hubbub_html_parser.rs @@ -274,6 +274,7 @@ pub fn parse_html(url: Url, debug!("created parser"); parser.set_document_node(unsafe { root.to_hubbub_node() }); parser.enable_scripting(true); + parser.enable_styling(true); let (css_chan2, css_chan3, js_chan2) = (css_chan.clone(), css_chan.clone(), js_chan.clone()); parser.set_tree_handler(~hubbub::TreeHandler { @@ -376,26 +377,8 @@ pub fn parse_html(url: Url, Node::as_abstract_node(~Text::new(data)).to_hubbub_node() } }, - ref_node: |_| { debug!("ref node"); }, - unref_node: |node| { - // check for the end of a