Add Comment and Doctype nodes to box_builder

This commit is contained in:
Brian Anderson 2012-09-06 17:21:09 -07:00
parent aa9fc2483f
commit e32da820e7

View file

@ -1,7 +1,7 @@
#[doc="Creates CSS boxes from a DOM."] #[doc="Creates CSS boxes from a DOM."]
import css::values::{DisplayType, Block, Inline, DisplayNone}; import css::values::{DisplayType, Block, Inline, DisplayNone};
import dom::base::{ElementData, HTMLDivElement, HTMLImageElement, Element, Text, Node}; import dom::base::{ElementData, HTMLDivElement, HTMLImageElement, Element, Text, Node, Doctype, Comment};
import gfx::geometry::zero_size_au; import gfx::geometry::zero_size_au;
import layout::base::{Appearance, BTree, BlockBox, Box, BoxKind, InlineBox, IntrinsicBox, NTree}; import layout::base::{Appearance, BTree, BlockBox, Box, BoxKind, InlineBox, IntrinsicBox, NTree};
import layout::base::{TextBoxKind}; import layout::base::{TextBoxKind};
@ -173,7 +173,8 @@ impl Node : PrivBoxBuilder {
} }
} }
}, },
_ => fail ~"unstyleable node type encountered" ~Doctype(*)
| ~Comment(*) => None
} }
} }
} }