diff --git a/src/servo-gfx/display_list.rs b/src/servo-gfx/display_list.rs index 26fb7c3a741..8d3c6c96468 100644 --- a/src/servo-gfx/display_list.rs +++ b/src/servo-gfx/display_list.rs @@ -44,7 +44,9 @@ impl DisplayItem { fn draw_into_context(&self, ctx: &RenderContext) { match self { - &SolidColor(_, color) => ctx.draw_solid_color(&self.d().bounds, color), + &SolidColor(_, color) => { + ctx.draw_solid_color(&self.d().bounds, color) + } &Text(_, ref run, ref range, color) => { debug!("drawing text at %?", self.d().bounds); let new_run = @run.deserialize(ctx.font_ctx); @@ -57,7 +59,9 @@ impl DisplayItem { debug!("drawing image at %?", self.d().bounds); ctx.draw_image(self.d().bounds, clone_arc(img)); } - &Border(_, width, color) => ctx.draw_border(&self.d().bounds, width, color), + &Border(_, width, color) => { + ctx.draw_border(&self.d().bounds, width, color) + } } debug!("%?", { diff --git a/src/servo/dom/node.rs b/src/servo/dom/node.rs index b3c0eb4ec23..ef0bc794d9a 100644 --- a/src/servo/dom/node.rs +++ b/src/servo/dom/node.rs @@ -124,7 +124,7 @@ pub struct Text { impl Text { static pub fn new(text: ~str) -> Text { Text { - parent: Node::new(CommentNodeTypeId), + parent: Node::new(TextNodeTypeId), text: text } } @@ -186,6 +186,7 @@ impl AbstractNode { } child_n.prev_sibling = parent_n.last_child; + parent_n.last_child = Some(child); } } } diff --git a/src/servo/layout/box.rs b/src/servo/layout/box.rs index 00ca12bdfdf..184a6efcd6a 100644 --- a/src/servo/layout/box.rs +++ b/src/servo/layout/box.rs @@ -430,8 +430,7 @@ impl RenderBox { } }, // TODO: items for background, border, outline - @GenericBox(_) => { - }, + @GenericBox(_) => {} @ImageBox(_, ref i) => { match i.get_image() { Some(image) => { diff --git a/src/servo/layout/box_builder.rs b/src/servo/layout/box_builder.rs index 52a29762fb0..71ff2ed5be3 100644 --- a/src/servo/layout/box_builder.rs +++ b/src/servo/layout/box_builder.rs @@ -280,8 +280,8 @@ impl LayoutTreeBuilder { fn next_box_id(&self) -> int { self.next_bid += 1; self.next_bid } fn next_flow_id(&self) -> int { self.next_cid += 1; self.next_cid } - /** Creates necessary box(es) and flow context(s) for the current DOM node, - and recurses on its children. */ + /// Creates necessary box(es) and flow context(s) for the current DOM node, + /// and recurses on its children. fn construct_recursively(&self, layout_ctx: &LayoutContext, cur_node: AbstractNode, diff --git a/src/servo/layout/display_list_builder.rs b/src/servo/layout/display_list_builder.rs index 00c82d6396b..ada9e34e185 100644 --- a/src/servo/layout/display_list_builder.rs +++ b/src/servo/layout/display_list_builder.rs @@ -74,3 +74,4 @@ impl FlowDisplayListBuilderMethods for FlowContext { } } } +