aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/context.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/layout/context.rs')
-rw-r--r--components/layout/context.rs13
1 files changed, 11 insertions, 2 deletions
diff --git a/components/layout/context.rs b/components/layout/context.rs
index 3411eed486c..54afd4ca209 100644
--- a/components/layout/context.rs
+++ b/components/layout/context.rs
@@ -137,14 +137,23 @@ impl LayoutContext<'_> {
if image_state.image_key() != image.id {
if image.should_animate() {
// i. Register/Replace tracking item in image_animation_manager.
- store.insert(node, ImageAnimationState::new(image));
+ store.insert(
+ node,
+ ImageAnimationState::new(
+ image,
+ self.shared_context().current_time_for_animations,
+ ),
+ );
} else {
// ii. Cancel Action if the node's image is no longer animated.
store.remove(&node);
}
}
} else if image.should_animate() {
- store.insert(node, ImageAnimationState::new(image));
+ store.insert(
+ node,
+ ImageAnimationState::new(image, self.shared_context().current_time_for_animations),
+ );
}
}