mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Add an option to show debug fragment borders
This is quite a bit cleaner than abusing the rust debug functionality. If we start collecting too many debugging options in the servo executable we could opt to organize them into a single option. Fixes #2263.
This commit is contained in:
parent
f6941b35e3
commit
2d5168a1e5
3 changed files with 18 additions and 14 deletions
|
@ -74,6 +74,9 @@ pub struct Opts {
|
|||
/// debugging purposes (`--show-debug-borders`).
|
||||
pub show_debug_borders: bool,
|
||||
|
||||
/// True if we should show borders on all fragments for debugging purposes (`--show-debug-fragment-borders`).
|
||||
pub show_debug_fragment_borders: bool,
|
||||
|
||||
/// If set with --disable-text-aa, disable antialiasing on fonts. This is primarily useful for reftests
|
||||
/// where pixel perfect results are required when using fonts such as the Ahem
|
||||
/// font for layout tests.
|
||||
|
@ -137,6 +140,7 @@ pub fn from_cmdline_args(args: &[String]) -> bool {
|
|||
getopts::optflag("f", "hard-fail", "Exit on task failure instead of displaying about:failure"),
|
||||
getopts::optflag("b", "bubble-widths", "Bubble intrinsic widths separately like other engines"),
|
||||
getopts::optflag("", "show-debug-borders", "Show debugging borders on layers and tiles."),
|
||||
getopts::optflag("", "show-debug-fragment-borders", "Show debugging borders on fragments."),
|
||||
getopts::optflag("", "disable-text-aa", "Disable antialiasing for text rendering."),
|
||||
getopts::optflag("", "trace-layout", "Write layout trace to external file for debugging."),
|
||||
getopts::optflagopt("", "devtools", "Start remote devtools server on port", "6000"),
|
||||
|
@ -238,6 +242,7 @@ pub fn from_cmdline_args(args: &[String]) -> bool {
|
|||
hard_fail: opt_match.opt_present("f"),
|
||||
bubble_inline_sizes_separately: bubble_inline_sizes_separately,
|
||||
show_debug_borders: opt_match.opt_present("show-debug-borders"),
|
||||
show_debug_fragment_borders: opt_match.opt_present("show-debug-fragment-borders"),
|
||||
enable_text_antialiasing: !opt_match.opt_present("disable-text-aa"),
|
||||
trace_layout: trace_layout,
|
||||
devtools_port: devtools_port,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue