1
extern crate peg;
2

            
3
pub mod css;
4
pub mod dom;
5
pub mod html;
6
pub mod layout;
7
pub mod painting;
8
pub mod style;
9

            
10
pub fn parse_html(h: &str) -> dom::Node {
11
    dom::Node::from(h)
12
}
13

            
14
pub fn parse_css(c: &str) -> css::Sheet {
15
    css::Sheet::from(c)
16
}
17

            
18
pub fn build_style_tree<'a>(h: &'a dom::Node, c: &'a css::Sheet) -> style::StyledNode<'a> {
19
    style::style_tree(h, c)
20
}
21

            
22
pub fn build_layout_tree<'a>(
23
    s: &'a style::StyledNode,
24
    d: layout::Dimensions,
25
) -> layout::LayoutBox<'a> {
26
    layout::layout_tree(s, d)
27
}
28

            
29
pub fn build_display_list(l: &layout::LayoutBox) -> painting::DisplayList {
30
    painting::build_display_list(l)
31
}