aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/animation.rs
diff options
context:
space:
mode:
authorMartin Robinson <mrobinson@igalia.com>2020-04-27 11:44:03 +0200
committerMartin Robinson <mrobinson@igalia.com>2020-04-29 15:31:31 +0200
commit5ca2e7ce91088c22116082147e765dde45a8cfa1 (patch)
tree51f791233e7b2ae7a6a4a03d10e81cc10f3cfab9 /components/layout/animation.rs
parentcd620f69ded03f23d2e7d7d6a10ce65a63636b8a (diff)
downloadservo-5ca2e7ce91088c22116082147e765dde45a8cfa1.tar.gz
servo-5ca2e7ce91088c22116082147e765dde45a8cfa1.zip
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.
Diffstat (limited to 'components/layout/animation.rs')
-rw-r--r--components/layout/animation.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/components/layout/animation.rs b/components/layout/animation.rs
index 57db0abda42..79a90f397a7 100644
--- a/components/layout/animation.rs
+++ b/components/layout/animation.rs
@@ -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);