pub fn style_tree<'a>(root: &'a dom::Node, stylesheet: &'a css::Stylesheet) -> StyledNode<'a> {
    StyledNode {
        node: root,
        specified_values: match root.node_type {
            dom::NodeType::Element(ref elem) => specified_values(elem, stylesheet),
            dom::NodeType::Text(_) => HashMap::new()
        },
        children: root.children.iter().map(|child| style_tree(child, stylesheet)).collect(),
    }
}
// Apply a stylesheet to an entire DOM tree, returning a StyledNode tree.
Apply a stylesheet to an entire DOM tree, returning a StyledNode tree.
Apply a stylesheet to an entire DOM tree returning a StyledNode tree .
pub fn style_tree<'a>(root: &'a dom::Node, stylesheet: &'a css::Stylesheet) -> StyledNode<'a> {
    StyledNode {
        node: root,
        specified_values: match root.node_type {
            dom::NodeType::Element(ref elem) => specified_values(elem, stylesheet),
            dom::NodeType::Text(_) => HashMap::new()
        },
        children: root.children.iter().map(|child| style_tree(child, stylesheet)).collect(),
    }
}
pub fn style_tree < ' a > ( root : & ' a dom :: Node , stylesheet : & ' a css :: Stylesheet ) -> StyledNode < ' a > { StyledNode { node : root , specified_values : match root . node_type { dom :: NodeType :: Element ( ref elem ) => specified_values ( elem , stylesheet ) , dom :: NodeType :: Text ( _ ) => HashMap :: new ( ) } , children : root . children . iter ( ) . map ( | child | style_tree ( child , stylesheet ) ) . collect ( ) , } }
Apply a stylesheet to an entire DOM tree, returning a StyledNode tree.
Apply a stylesheet to an entire DOM tree returning a StyledNode tree .
root
&'a dom::Node
stylesheet
&'a css::Stylesheet
root
&'a dom::Node
stylesheet
&'a css::Stylesheet