mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
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:
parent
52e2cc5ff0
commit
8b60424e29
1 changed files with 8 additions and 3 deletions
|
@ -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 don’t specify their own starting position.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue