Make parallel DOM traversal and style calculation operate on TNode instead of LayoutNode.

This commit is contained in:
Bobby Holley 2015-12-31 11:05:17 -08:00
parent 238a8786de
commit ebc5eb1b98
4 changed files with 30 additions and 12 deletions

View file

@ -156,6 +156,14 @@ pub trait TNode<'ln> : Sized + Copy + Clone {
fn prev_sibling(&self) -> Option<Self>;
fn next_sibling(&self) -> Option<Self>;
/// Returns the style results for the given node. If CSS selector matching
/// has not yet been performed, fails.
fn style(&self) -> Ref<Arc<ComputedValues>>;
/// Removes the style from this node.
fn unstyle(self);
}
pub trait TDocument<'ld> : Sized + Copy + Clone {