Don't use #[animation(constant)] in ShapeBox

We can just rely on the implementation for the involved fields to return an error
if the values are different.
This commit is contained in:
Anthony Ramine 2018-03-09 10:30:29 +01:00
parent 539c60389e
commit e82d0c20a6

View file

@ -18,7 +18,7 @@ pub type ClippingShape<BasicShape, Url> = ShapeSource<BasicShape, GeometryBox, U
/// <https://drafts.fxtf.org/css-masking-1/#typedef-geometry-box> /// <https://drafts.fxtf.org/css-masking-1/#typedef-geometry-box>
#[allow(missing_docs)] #[allow(missing_docs)]
#[derive(Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)] #[derive(Animate, Clone, Copy, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)]
pub enum GeometryBox { pub enum GeometryBox {
FillBox, FillBox,
StrokeBox, StrokeBox,
@ -32,7 +32,7 @@ pub type FloatAreaShape<BasicShape, Image> = ShapeSource<BasicShape, ShapeBox, I
/// https://drafts.csswg.org/css-shapes-1/#typedef-shape-box /// https://drafts.csswg.org/css-shapes-1/#typedef-shape-box
#[allow(missing_docs)] #[allow(missing_docs)]
#[cfg_attr(feature = "servo", derive(Deserialize, Serialize))] #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))]
#[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq)] #[derive(Animate, Clone, Copy, Debug, Eq, MallocSizeOf, Parse, PartialEq)]
#[derive(ToComputedValue, ToCss)] #[derive(ToComputedValue, ToCss)]
pub enum ShapeBox { pub enum ShapeBox {
MarginBox, MarginBox,
@ -49,7 +49,6 @@ pub enum ShapeSource<BasicShape, ReferenceBox, ImageOrUrl> {
ImageOrUrl(ImageOrUrl), ImageOrUrl(ImageOrUrl),
Shape( Shape(
BasicShape, BasicShape,
#[animation(constant)]
Option<ReferenceBox>, Option<ReferenceBox>,
), ),
#[animation(error)] #[animation(error)]