diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 6ea63347b60..a488524c8d1 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -680,6 +680,15 @@ pub trait Animatable: Sized { self.add_weighted(other, 1.0, 1.0) } + /// [Accumulates][animation-accumulation] this value onto itself (|count| - 1) times then + /// accumulates |other| onto the result. + /// If |count| is zero, the result will be |other|. + /// + /// [animation-accumulation]: https://w3c.github.io/web-animations/#animation-accumulation + fn accumulate(&self, other: &Self, count: u64) -> Result { + self.add_weighted(other, count as f64, 1.0) + } + /// Compute distance between a value and another for a given property. fn compute_distance(&self, _other: &Self) -> Result { Err(()) }