From 52e8a9be2842838f2671d55a0fa587eb13d9d5a6 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Fri, 19 Jul 2013 18:39:14 -0600 Subject: [PATCH 1/2] Fix busted iterator. --- src/components/script/dom/node.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 } } From 587738d1b15f645937c62d7c35aa62d563d536e9 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Fri, 19 Jul 2013 18:39:42 -0600 Subject: [PATCH 2/2] Use complete_style instead of bogus unref. --- .../script/html/hubbub_html_parser.rs | 46 ++++++++++--------- src/support/hubbub/libhubbub | 2 +- src/support/hubbub/rust-hubbub | 2 +- 3 files changed, 27 insertions(+), 23 deletions(-) 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