mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implements a DisplayList dumper.
This patch will iterate through the DisplayList after the reflow is done and print its elements (as also any sub-lists associated to a child node stacking context). It adds a new CLI parameter to trigger the function to dump the display list to console (i.e. servo --debug dump-display-list url). Using both display list and flow tree information is helpful to debug rendering issues.
This commit is contained in:
parent
efb7f5cd91
commit
b9e9d7471d
3 changed files with 59 additions and 0 deletions
|
@ -709,6 +709,12 @@ impl LayoutTask {
|
|||
color,
|
||||
ScrollPolicy::Scrollable));
|
||||
let origin = Rect(Point2D(Au(0), Au(0)), root_size);
|
||||
|
||||
if opts::get().dump_display_list {
|
||||
println!("#### start printing display list.");
|
||||
display_list.print_items(String::from_str("#"));
|
||||
}
|
||||
|
||||
let stacking_context = Arc::new(StackingContext::new(display_list,
|
||||
&origin,
|
||||
&origin,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue