mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
pretty print tree
This commit is contained in:
parent
dfd8e85338
commit
43c94d3445
4 changed files with 42 additions and 15 deletions
|
@ -2958,24 +2958,24 @@ impl Fragment {
|
|||
impl fmt::Debug for Fragment {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let border_padding_string = if !self.border_padding.is_zero() {
|
||||
format!(" border_padding={:?}", self.border_padding)
|
||||
format!("\nborder_padding={:?}", self.border_padding)
|
||||
} else {
|
||||
"".to_owned()
|
||||
};
|
||||
|
||||
let margin_string = if !self.margin.is_zero() {
|
||||
format!(" margin={:?}", self.margin)
|
||||
format!("\nmargin={:?}", self.margin)
|
||||
} 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, "{}({}) [{:?}] border_box={:?}{}{}{}",
|
||||
write!(f, "\n{}({}) [{:?}]\nborder_box={:?}{}{}{}",
|
||||
self.specific.get_type(),
|
||||
self.debug_id,
|
||||
self.specific,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue