aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/flow.rs
diff options
context:
space:
mode:
authortigercosmos <phy.tiger@gmail.com>2017-12-22 16:21:32 +0800
committertigercosmos <phy.tiger@gmail.com>2017-12-23 14:40:06 +0800
commit43c94d34457965ae221947a2986a265c428dfff2 (patch)
treeebf00105d2a05485d510e36fdcf11890a8a17856 /components/layout/flow.rs
parentdfd8e85338fb5460d800577d5761e979644dc869 (diff)
downloadservo-43c94d34457965ae221947a2986a265c428dfff2.tar.gz
servo-43c94d34457965ae221947a2986a265c428dfff2.zip
pretty print tree
Diffstat (limited to 'components/layout/flow.rs')
-rw-r--r--components/layout/flow.rs13
1 files changed, 8 insertions, 5 deletions
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index c706516933b..e4b19e20b0c 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -925,26 +925,29 @@ impl fmt::Debug for BaseFlow {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let child_count = self.parallel.children_count.load(Ordering::SeqCst);
let child_count_string = if child_count > 0 {
- format!(" children={}", child_count)
+ format!("\nchildren={}", child_count)
} else {
"".to_owned()
};
let absolute_descendants_string = if self.abs_descendants.len() > 0 {
- format!(" abs-descendents={}", self.abs_descendants.len())
+ format!("\nabs-descendents={}", self.abs_descendants.len())
} else {
"".to_owned()
};
let damage_string = if self.restyle_damage != RestyleDamage::empty() {
- format!(" damage={:?}", self.restyle_damage)
+ format!("\ndamage={:?}", self.restyle_damage)
} else {
"".to_owned()
};
write!(f,
- "sc={:?} pos={:?}, {}{} floatspec-in={:?}, floatspec-out={:?}, \
- overflow={:?}{}{}{}",
+ "\nsc={:?}\
+ \npos={:?}{}{}\
+ \nfloatspec-in={:?}\
+ \nfloatspec-out={:?}\
+ \noverflow={:?}{}{}{}",
self.stacking_context_id,
self.position,
if self.flags.contains(FlowFlags::FLOATS_LEFT) { "FL" } else { "" },