more efficient preorder DOM traversals

This commit is contained in:
Clark Gaebel 2014-10-20 14:36:31 -07:00
parent 156ca98236
commit a5bb2f299f
3 changed files with 94 additions and 97 deletions

View file

@ -13,6 +13,7 @@ use string_cache::{Atom, Namespace};
pub trait TNode<'a, E: TElement<'a>> : Clone + Copy {
fn parent_node(self) -> Option<Self>;
fn first_child(self) -> Option<Self>;
fn last_child(self) -> Option<Self>;
fn prev_sibling(self) -> Option<Self>;
fn next_sibling(self) -> Option<Self>;
fn is_document(self) -> bool;
@ -57,4 +58,3 @@ pub trait TElementAttributes : Copy {
fn get_length_attribute(self, attribute: LengthAttribute) -> LengthOrPercentageOrAuto;
fn get_integer_attribute(self, attribute: IntegerAttribute) -> Option<i32>;
}