aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/components/main/layout/box.rs16
-rw-r--r--src/components/main/layout/float.rs4
-rw-r--r--src/components/main/layout/inline.rs2
3 files changed, 21 insertions, 1 deletions
diff --git a/src/components/main/layout/box.rs b/src/components/main/layout/box.rs
index dc5243b0b4d..572ddb4d134 100644
--- a/src/components/main/layout/box.rs
+++ b/src/components/main/layout/box.rs
@@ -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)]
diff --git a/src/components/main/layout/float.rs b/src/components/main/layout/float.rs
index faa8571955c..23cd1f3e47e 100644
--- a/src/components/main/layout/float.rs
+++ b/src/components/main/layout/float.rs
@@ -93,6 +93,10 @@ impl FloatFlow {
false
}
+
+ fn debug_str(&self) -> ~str {
+ ~"FloatFlow"
+ }
}
impl FlowContext for FloatFlow {
diff --git a/src/components/main/layout/inline.rs b/src/components/main/layout/inline.rs
index d598e9356ab..b1add7e39d2 100644
--- a/src/components/main/layout/inline.rs
+++ b/src/components/main/layout/inline.rs
@@ -893,7 +893,7 @@ impl FlowContext for InlineFlow {
}
fn debug_str(&self) -> ~str {
- ~"InlineFlow"
+ ~"InlineFlow: " + self.boxes.map(|s| s.debug_str()).connect(", ")
}
}