aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/animation.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2020-04-17 13:31:19 +0200
committerMartin Robinson <mrobinson@igalia.com>2020-04-18 13:48:52 +0200
commita0b495750e07c3b3b6e21732b7daac92f032e9b6 (patch)
tree00f8d7121b46f9af2beb55be16754f90835e3acc /components/layout/animation.rs
parent71940ff28c38929139815c1f9b4c70d77abbf993 (diff)
downloadservo-a0b495750e07c3b3b6e21732b7daac92f032e9b6.tar.gz
servo-a0b495750e07c3b3b6e21732b7daac92f032e9b6.zip
Eliminate `AnimationFrame`
This intermediate data structure doesn't really buy us anything and is a bit confusing.
Diffstat (limited to 'components/layout/animation.rs')
-rw-r--r--components/layout/animation.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/components/layout/animation.rs b/components/layout/animation.rs
index 8a99a75fc72..9dc59da1937 100644
--- a/components/layout/animation.rs
+++ b/components/layout/animation.rs
@@ -80,8 +80,8 @@ pub fn update_animation_state<E>(
for mut running_animation in running_animations.drain(..) {
let still_running = !running_animation.is_expired() &&
match running_animation {
- Animation::Transition(_, started_at, ref frame) => {
- now < started_at + frame.duration
+ Animation::Transition(_, started_at, ref property_animation) => {
+ now < started_at + (property_animation.duration)
},
Animation::Keyframes(_, _, _, ref mut state) => {
// This animation is still running, or we need to keep
@@ -100,12 +100,12 @@ pub fn update_animation_state<E>(
continue;
}
- if let Animation::Transition(node, _, ref frame) = running_animation {
+ if let Animation::Transition(node, _, ref property_animation) = running_animation {
script_chan
.send(ConstellationControlMsg::TransitionEnd(
node.to_untrusted_node_address(),
- frame.property_animation.property_name().into(),
- frame.duration,
+ property_animation.property_name().into(),
+ property_animation.duration,
))
.unwrap();
}