Coalesce pending reflow messages so they don't queue up.

This commit is contained in:
Glenn Watson 2014-09-12 10:03:52 +10:00
parent 4e35b82770
commit 7503033e57
2 changed files with 17 additions and 2 deletions

View file

@ -91,6 +91,9 @@ pub struct Page {
// Child Pages.
pub children: Traceable<RefCell<Vec<Rc<Page>>>>,
/// Number of pending reflows that were sent while layout was active.
pub pending_reflows: Cell<int>,
}
pub struct PageIterator {
@ -154,6 +157,7 @@ impl Page {
resource_task: Untraceable::new(resource_task),
constellation_chan: Untraceable::new(constellation_chan),
children: Traceable::new(RefCell::new(vec!())),
pending_reflows: Cell::new(0),
}
}