Fix some debug message formatting, and add some more cases to the UA style simulator.

This commit is contained in:
Brian J. Burg 2012-10-10 17:50:06 -07:00
parent 356e4dee21
commit bd716214e7
2 changed files with 10 additions and 3 deletions

View file

@ -159,6 +159,13 @@ impl LayoutTreeBuilder {
~Element(e) => match e.kind {
~HTMLHeadElement(*) => DisplayNone,
~HTMLScriptElement(*) => DisplayNone,
~HTMLParagraphElement(*) => DisplayBlock,
~HTMLDivElement(*) => DisplayBlock,
~HTMLBodyElement(*) => DisplayBlock,
~HTMLHeadingElement(*) => DisplayBlock,
~HTMLHtmlElement(*) => DisplayBlock,
~HTMLUListElement(*) => DisplayBlock,
~HTMLOListElement(*) => DisplayBlock,
_ => resolved
}
}

View file

@ -358,19 +358,19 @@ impl FlowContext : BoxedDebugMethods {
let repr = match *self {
InlineFlow(*) => {
let mut s = self.inline().boxes.foldl(~"InlineFlow(children=", |s, box| {
fmt!("%s %?", *s, box.d().id)
fmt!("%s b%d", *s, box.d().id)
});
s += ~")"; s
},
BlockFlow(*) => {
match self.block().box {
Some(box) => fmt!("BlockFlow(box=b%?)", box.d().id),
Some(box) => fmt!("BlockFlow(box=b%d)", box.d().id),
None => ~"BlockFlow",
}
},
RootFlow(*) => {
match self.root().box {
Some(box) => fmt!("RootFlo(box=b%?)", box.d().id),
Some(box) => fmt!("RootFlo(box=b%d)", box.d().id),
None => ~"RootFlow",
}
},