mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
auto merge of #3747 : mrobinson/servo/validate-display-list, r=pcwalton
When this option is enabled, the layout task will print an error when display list items draw outside their owning Flow's position rect. This will make it easier to detect layout errors before they break rendering. This is a command-line option for the moment, because we violate this rule quite a bit still. Once all bugs causing this are fixed, we can be more aggressive about enabling the option.
This commit is contained in:
commit
f5ad89f927
3 changed files with 36 additions and 0 deletions
|
@ -99,6 +99,9 @@ pub struct Opts {
|
|||
|
||||
/// Dumps the flow tree after a layout.
|
||||
pub dump_flow_tree: bool,
|
||||
|
||||
/// Whether to show an error when display list geometry escapes flow overflow regions.
|
||||
pub validate_display_list_geometry: bool,
|
||||
}
|
||||
|
||||
fn print_usage(app: &str, opts: &[getopts::OptGroup]) {
|
||||
|
@ -147,6 +150,7 @@ pub fn from_cmdline_args(args: &[String]) -> bool {
|
|||
getopts::optopt("", "resolution", "Set window resolution.", "800x600"),
|
||||
getopts::optopt("u", "user-agent", "Set custom user agent string", "NCSA Mosaic/1.0 (X11;SunOS 4.1.4 sun4m)"),
|
||||
getopts::optflag("", "dump-flow-tree", "Dump the flow (render) tree during each layout."),
|
||||
getopts::optflag("", "validate-display-list-geometry", "Display an error when display list geometry escapes overflow region."),
|
||||
getopts::optflag("h", "help", "Print this message")
|
||||
);
|
||||
|
||||
|
@ -249,6 +253,7 @@ pub fn from_cmdline_args(args: &[String]) -> bool {
|
|||
initial_window_size: initial_window_size,
|
||||
user_agent: opt_match.opt_str("u"),
|
||||
dump_flow_tree: opt_match.opt_present("dump-flow-tree"),
|
||||
validate_display_list_geometry: opt_match.opt_present("validate-display-list-geometry"),
|
||||
};
|
||||
|
||||
set_opts(opts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue