diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-05-05 09:11:30 -0500 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-05-05 09:11:30 -0500 |
commit | 49aed6555dbc008c1a378c5cbb303f5467232b6b (patch) | |
tree | 9146cdd7126ead59c57cacbaa04eda0f16761f65 /components/layout/animation.rs | |
parent | 7b87085c1880c60aa3be5b3ec4572a0d93fd5537 (diff) | |
parent | ef8edd4e87aeb3cc71dfd9da2f69437080f5410e (diff) | |
download | servo-49aed6555dbc008c1a378c5cbb303f5467232b6b.tar.gz servo-49aed6555dbc008c1a378c5cbb303f5467232b6b.zip |
Auto merge of #5935 - servo:rustup_2015-04-25, r=Ms2ger
r? everybody
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5935)
<!-- Reviewable:end -->
Diffstat (limited to 'components/layout/animation.rs')
-rw-r--r-- | components/layout/animation.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/components/layout/animation.rs b/components/layout/animation.rs index 9cd46d4bcde..4bf5dd7ab6e 100644 --- a/components/layout/animation.rs +++ b/components/layout/animation.rs @@ -31,7 +31,7 @@ pub fn start_transitions_if_applicable(new_animations_sender: &Sender<Animation> property_animation.update(new_style, 0.0); // Kick off the animation. - let now = clock_ticks::precise_time_s(); + let now = clock_ticks::precise_time_s() as f32; let animation_style = new_style.get_animation(); let start_time = now + animation_style.transition_delay.0.get_mod(i).seconds(); new_animations_sender.send(Animation { @@ -66,7 +66,7 @@ pub fn recalc_style_for_animation(flow: &mut Flow, animation: &Animation) { return } - let now = clock_ticks::precise_time_s(); + let now = clock_ticks::precise_time_s() as f32; let mut progress = (now - animation.start_time) / animation.duration(); if progress > 1.0 { progress = 1.0 @@ -91,7 +91,7 @@ pub fn recalc_style_for_animation(flow: &mut Flow, animation: &Animation) { /// Handles animation updates. pub fn tick_all_animations(layout_task: &LayoutTask, rw_data: &mut LayoutTaskData) { let running_animations = mem::replace(&mut rw_data.running_animations, Vec::new()); - let now = clock_ticks::precise_time_s(); + let now = clock_ticks::precise_time_s() as f32; for running_animation in running_animations.into_iter() { layout_task.tick_animation(&running_animation, rw_data); |