style: Return Err() in to_animated_zero() for offset-path

It's unnecessary to implement ToAnimatedZero for this property and so we
return Err(()), just like other properties which also use basic shapes,
e.g. clip-path, shape-outside.

Differential Revision: https://phabricator.services.mozilla.com/D179859
This commit is contained in:
Boris Chiou 2023-06-06 21:40:51 +00:00 committed by Martin Robinson
parent 52e2cc5ff0
commit 8b60424e29

View file

@ -4,6 +4,7 @@
//! Generic types for CSS Motion Path.
use crate::values::animated::ToAnimatedZero;
use crate::values::generics::position::GenericPosition;
use crate::values::specified::SVGPathData;
@ -21,7 +22,6 @@ use crate::values::specified::SVGPathData;
PartialEq,
Serialize,
SpecifiedValueInfo,
ToAnimatedZero,
ToComputedValue,
ToCss,
ToResolvedValue,
@ -57,7 +57,6 @@ impl RaySize {
PartialEq,
Serialize,
SpecifiedValueInfo,
ToAnimatedZero,
ToComputedValue,
ToCss,
ToResolvedValue,
@ -93,7 +92,6 @@ pub struct RayFunction<Angle> {
PartialEq,
Serialize,
SpecifiedValueInfo,
ToAnimatedZero,
ToComputedValue,
ToCss,
ToResolvedValue,
@ -125,6 +123,13 @@ impl<Angle> OffsetPath<Angle> {
}
}
impl<Angle> ToAnimatedZero for OffsetPath<Angle> {
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> {
Err(())
}
}
/// The offset-position property, which specifies the offset starting position that is used by the
/// <offset-path> functions if they dont specify their own starting position.
///