mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Restyle should reflect animations and transitions
When doing a restyle, we should apply animations and transitions to the new style so that it is reflected in `getComputedStyle()` and the new style information properly cascades. This is the first part of properly ticking animations and transitions. This causes a couple new animations tests failures (along with many new passes), but we currently don't have support for properly handling animations after they have completed, so this isn't totally unexpected.
This commit is contained in:
parent
cd620f69de
commit
5ca2e7ce91
62 changed files with 344 additions and 10360 deletions
|
@ -15,6 +15,7 @@ use script_traits::UntrustedNodeAddress;
|
|||
use script_traits::{
|
||||
AnimationState, ConstellationControlMsg, LayoutMsg as ConstellationMsg, TransitionEventType,
|
||||
};
|
||||
use servo_arc::Arc;
|
||||
use style::animation::{
|
||||
update_style_for_animation, Animation, ElementAnimationState, PropertyAnimation,
|
||||
};
|
||||
|
@ -223,7 +224,7 @@ fn do_recalc_style_for_animations<E>(
|
|||
update_style_for_animation::<E>(
|
||||
&context.style_context,
|
||||
animation,
|
||||
&mut fragment.style,
|
||||
Arc::make_mut(&mut fragment.style),
|
||||
&ServoMetricsProvider,
|
||||
);
|
||||
let difference = RestyleDamage::compute_style_difference(&old_style, &fragment.style);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue