mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Allow dumping the fragment tree in layout_2020
This is done when the dump-flow-tree debug option is passed.
This commit is contained in:
parent
c6192dc286
commit
ea8c635344
4 changed files with 100 additions and 5 deletions
|
@ -17,6 +17,7 @@ use crate::replaced::ReplacedContent;
|
|||
use crate::sizing::ContentSizesRequest;
|
||||
use crate::style_ext::{Display, DisplayGeneratingBox, DisplayInside};
|
||||
use crate::DefiniteContainingBlock;
|
||||
use gfx_traits::print_tree::PrintTree;
|
||||
use script_layout_interface::wrapper_traits::LayoutNode;
|
||||
use servo_arc::Arc;
|
||||
use style::properties::ComputedValues;
|
||||
|
@ -154,4 +155,11 @@ impl FragmentTreeRoot {
|
|||
fragment.build_display_list(builder, &containing_block)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn print(&self) {
|
||||
let mut print_tree = PrintTree::new("Fragment Tree".to_string());
|
||||
for fragment in &self.0 {
|
||||
fragment.print(&mut print_tree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue