mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
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:
parent
bdfa6b0751
commit
0f1831e2fa
10 changed files with 101 additions and 362 deletions
|
@ -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.,
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue