mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Get rendering back to parity with master
This commit is contained in:
parent
cf3917f5b1
commit
416e870385
5 changed files with 12 additions and 7 deletions
|
@ -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!("%?", {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -430,8 +430,7 @@ impl RenderBox {
|
|||
}
|
||||
},
|
||||
// TODO: items for background, border, outline
|
||||
@GenericBox(_) => {
|
||||
},
|
||||
@GenericBox(_) => {}
|
||||
@ImageBox(_, ref i) => {
|
||||
match i.get_image() {
|
||||
Some(image) => {
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -74,3 +74,4 @@ impl FlowDisplayListBuilderMethods for FlowContext {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue