aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/window.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <ecoal95@gmail.com>2016-07-09 22:43:52 -0700
committerEmilio Cobos Álvarez <ecoal95@gmail.com>2016-07-20 09:05:53 -0700
commit0b67b218d0c8dc48a5301227802296aff98af6d7 (patch)
tree50988441e1577dcfa61d1581318b34255e3a2c07 /components/script/dom/window.rs
parent2e68821014053ebf547818e017c423a5d52717d5 (diff)
downloadservo-0b67b218d0c8dc48a5301227802296aff98af6d7.tar.gz
servo-0b67b218d0c8dc48a5301227802296aff98af6d7.zip
style: Add a new Timer structure to the shared style context, and basic infrastructure for controlling animations.
Diffstat (limited to 'components/script/dom/window.rs')
-rw-r--r--components/script/dom/window.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/script/dom/window.rs b/components/script/dom/window.rs
index 4878f33f994..07509a92e4a 100644
--- a/components/script/dom/window.rs
+++ b/components/script/dom/window.rs
@@ -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