mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
gfx: Fix debug dumping of child stacking contexts.
This commit is contained in:
parent
14a544b64c
commit
4e847c05fb
1 changed files with 6 additions and 9 deletions
|
@ -170,7 +170,7 @@ impl DisplayList {
|
||||||
let doit = |items: &Vec<DisplayItem>| {
|
let doit = |items: &Vec<DisplayItem>| {
|
||||||
for item in items.iter() {
|
for item in items.iter() {
|
||||||
match *item {
|
match *item {
|
||||||
DisplayItem::SolidColorClass(ref solid_color) => println!("{:?} SolidColor. {:?}", indentation, solid_color.base.bounds),
|
DisplayItem::SolidColorClass(ref solid_color) => println!("{} SolidColor. {:?}", indentation, solid_color.base.bounds),
|
||||||
DisplayItem::TextClass(ref text) => println!("{:?} Text. {:?}", indentation, text.base.bounds),
|
DisplayItem::TextClass(ref text) => println!("{:?} Text. {:?}", indentation, text.base.bounds),
|
||||||
DisplayItem::ImageClass(ref image) => println!("{:?} Image. {:?}", indentation, image.base.bounds),
|
DisplayItem::ImageClass(ref image) => println!("{:?} Image. {:?}", indentation, image.base.bounds),
|
||||||
DisplayItem::BorderClass(ref border) => println!("{:?} Border. {:?}", indentation, border.base.bounds),
|
DisplayItem::BorderClass(ref border) => println!("{:?} Border. {:?}", indentation, border.base.bounds),
|
||||||
|
@ -184,14 +184,11 @@ impl DisplayList {
|
||||||
|
|
||||||
doit(&(self.all_display_items()));
|
doit(&(self.all_display_items()));
|
||||||
if self.children.len() != 0 {
|
if self.children.len() != 0 {
|
||||||
println!("{} Children stacking contexts list length: {}", indentation, self.children.len());
|
println!("{} Children stacking contexts list length: {}",
|
||||||
for subitem in self.children.iter() {
|
indentation,
|
||||||
doit(&subitem.display_list.all_display_items());
|
self.children.len());
|
||||||
if subitem.display_list.children.len() != 0 {
|
for sublist in self.children.iter() {
|
||||||
// Rant: String doesn't have a substr() method that won't overflow if the
|
sublist.display_list.print_items(indentation.clone()+&indentation[0..min_length]);
|
||||||
// selected range is bigger than the string length.
|
|
||||||
subitem.display_list.print_items(indentation.clone()+&indentation[0..min_length]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue