style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations.

This commit is contained in:
Emilio Cobos Álvarez 2016-07-09 22:43:52 -07:00
parent 2e68821014
commit 0b67b218d0
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
20 changed files with 178 additions and 26 deletions

View file

@ -1030,6 +1030,12 @@ impl Window {
recv.recv().unwrap_or((Size2D::zero(), Point2D::zero()))
}
/// Advances the layout animation clock by `delta` milliseconds, and then
/// forces a reflow.
pub fn advance_animation_clock(&self, delta: i32) {
self.layout_chan.send(Msg::AdvanceClockMs(delta)).unwrap();
}
/// Reflows the page unconditionally if possible and not suppressed. This
/// method will wait for the layout thread to complete (but see the `TODO`
/// below). If there is no window size yet, the page is presumed invisible