auto merge of #1227 : pcwalton/servo/debug-more, r=kmcallister

r? @larsbergstrom
This commit is contained in:
bors-servo 2013-11-12 18:25:20 -08:00
commit 01262861e3
3 changed files with 21 additions and 1 deletions

View file

@ -209,6 +209,10 @@ impl RenderBox for GenericRenderBox {
// FIXME(pcwalton): This seems clownshoes; can we remove?
self.base.position.mutate().ptr.size.width = Au::from_px(45)
}
fn debug_str(&self) -> ~str {
~"(generic)"
}
}
/// A box that represents a (replaced content) image and its accompanying borders, shadows, etc.
@ -282,6 +286,10 @@ impl ImageRenderBox {
fn as_image_render_box(@self) -> @ImageRenderBox {
self
}
fn debug_str(&self) -> ~str {
~"(image)"
}
}
impl RenderBox for ImageRenderBox {
@ -493,6 +501,10 @@ impl RenderBox for TextRenderBox {
SplitDidFit(left_box, right_box)
}
}
fn debug_str(&self) -> ~str {
self.run.text.get().to_str()
}
}
/// The data for an unscanned text box.
@ -574,6 +586,10 @@ impl RenderBox for UnscannedTextRenderBox {
fn as_unscanned_text_render_box(@self) -> @UnscannedTextRenderBox {
self
}
fn debug_str(&self) -> ~str {
self.text.clone()
}
}
#[deriving(Eq)]

View file

@ -93,6 +93,10 @@ impl FloatFlow {
false
}
fn debug_str(&self) -> ~str {
~"FloatFlow"
}
}
impl FlowContext for FloatFlow {

View file

@ -893,7 +893,7 @@ impl FlowContext for InlineFlow {
}
fn debug_str(&self) -> ~str {
~"InlineFlow"
~"InlineFlow: " + self.boxes.map(|s| s.debug_str()).connect(", ")
}
}