Remove AnimatedProperty

This removes an extra layer of abstraction and allows Servo to share
more code with Gecko. In addition, we will need to handle raw
`AnimationValue` structs soon in order to fully implement "faster
reversing of interrupted transitions."
This commit is contained in:
Martin Robinson 2020-05-12 18:05:24 +02:00
parent bdfa6b0751
commit 0f1831e2fa
10 changed files with 101 additions and 362 deletions

View file

@ -113,7 +113,7 @@ impl Animations {
transition.state = AnimationState::Finished;
update.add_event(
transition.node,
transition.property_animation.property_name().into(),
transition.property_animation.property_id().name().into(),
TransitionOrAnimationEventType::TransitionEnd,
transition.property_animation.duration,
);
@ -135,7 +135,7 @@ impl Animations {
// according to https://drafts.csswg.org/css-transitions/#event-transitionevent
update.add_event(
transition.node,
transition.property_animation.property_name().into(),
transition.property_animation.property_id().name().into(),
TransitionOrAnimationEventType::TransitionCancel,
(now - transition.start_time).max(0.),
);
@ -157,7 +157,7 @@ impl Animations {
// according to https://drafts.csswg.org/css-transitions/#event-transitionevent
update.add_event(
transition.node,
transition.property_animation.property_name().into(),
transition.property_animation.property_id().name().into(),
TransitionOrAnimationEventType::TransitionRun,
0.,
);