diff options
author | Adenilson Cavalcanti <cavalcantii@gmail.com> | 2015-02-24 17:51:23 -0800 |
---|---|---|
committer | Adenilson Cavalcanti <cavalcantii@gmail.com> | 2015-02-25 19:10:05 -0800 |
commit | b9e9d7471d12079c3c2d7970b21bd56a1460ee78 (patch) | |
tree | 75a1a0aa143c557756f551674bfbed3a13d24ee5 /components/layout/layout_task.rs | |
parent | efb7f5cd91210ba5e4cef195298ffec88b0a970b (diff) | |
download | servo-b9e9d7471d12079c3c2d7970b21bd56a1460ee78.tar.gz servo-b9e9d7471d12079c3c2d7970b21bd56a1460ee78.zip |
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.
Diffstat (limited to 'components/layout/layout_task.rs')
-rw-r--r-- | components/layout/layout_task.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/components/layout/layout_task.rs b/components/layout/layout_task.rs index 3d2bc463cdc..1b043c3d26b 100644 --- a/components/layout/layout_task.rs +++ b/components/layout/layout_task.rs @@ -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, |