Move is_void() Element method together with the other struct methods,

it becomes part of ElementHelpers.
This commit is contained in:
Adenilson Cavalcanti 2014-09-19 12:00:31 -07:00
parent 249638da8f
commit 7581335232
3 changed files with 18 additions and 19 deletions

View file

@ -929,7 +929,7 @@ impl NodeIterator {
fn next_child<'b>(&self, node: JSRef<'b, Node>) -> Option<JSRef<'b, Node>> {
if !self.include_descendants_of_void && node.is_element() {
let elem: JSRef<Element> = ElementCast::to_ref(node).unwrap();
if elem.deref().is_void() {
if elem.is_void() {
None
} else {
node.first_child().map(|child| (*child.root()).clone())