try to reset flows which need reflow, since reflow isn't yet idempotent

This commit is contained in:
Clark Gaebel 2014-10-10 11:25:41 -04:00
parent d168501555
commit f552e2f750
13 changed files with 310 additions and 82 deletions

View file

@ -59,6 +59,8 @@ pub struct Opts {
/// sequential algorithm.
pub layout_threads: uint,
pub incremental_layout: bool,
/// True to exit after the page load (`-x`).
pub exit_after_load: bool,
@ -126,6 +128,7 @@ pub fn from_cmdline_args(args: &[String]) -> Option<Opts> {
getopts::optflagopt("m", "memory-profile", "Memory profiler flag and output interval", "10"),
getopts::optflag("x", "exit", "Exit after load flag"),
getopts::optopt("y", "layout-threads", "Number of threads to use for layout", "1"),
getopts::optflag("i", "incremental-layout", "Whether or not to use incremental layout."),
getopts::optflag("z", "headless", "Headless mode"),
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"),
@ -208,6 +211,8 @@ pub fn from_cmdline_args(args: &[String]) -> Option<Opts> {
None => cmp::max(rt::default_sched_threads() * 3 / 4, 1),
};
let incremental_layout = opt_match.opt_present("i");
let mut bubble_inline_sizes_separately = opt_match.opt_present("b");
let trace_layout = opt_match.opt_present("trace-layout");
@ -242,6 +247,7 @@ pub fn from_cmdline_args(args: &[String]) -> Option<Opts> {
memory_profiler_period: memory_profiler_period,
enable_experimental: opt_match.opt_present("e"),
layout_threads: layout_threads,
incremental_layout: incremental_layout,
exit_after_load: opt_match.opt_present("x"),
output_file: opt_match.opt_str("o"),
headless: opt_match.opt_present("z"),

View file

@ -68,6 +68,8 @@ pub enum TimeProfilerCategory {
CompositingCategory,
LayoutPerformCategory,
LayoutStyleRecalcCategory,
LayoutRestyleDamagePropagation,
LayoutNonIncrementalReset,
LayoutSelectorMatchCategory,
LayoutTreeBuilderCategory,
LayoutDamagePropagateCategory,
@ -86,6 +88,8 @@ impl Formatable for TimeProfilerCategory {
fn format(&self) -> String {
let padding = match *self {
LayoutStyleRecalcCategory |
LayoutRestyleDamagePropagation |
LayoutNonIncrementalReset |
LayoutMainCategory |
LayoutDispListBuildCategory |
LayoutShapingCategory |
@ -99,6 +103,8 @@ impl Formatable for TimeProfilerCategory {
CompositingCategory => "Compositing",
LayoutPerformCategory => "Layout",
LayoutStyleRecalcCategory => "Style Recalc",
LayoutRestyleDamagePropagation => "Restyle Damage Propagation",
LayoutNonIncrementalReset => "Non-incremental reset (temporary)",
LayoutSelectorMatchCategory => "Selector Matching",
LayoutTreeBuilderCategory => "Tree Building",
LayoutDamagePropagateCategory => "Damage Propagation",