diff options
Diffstat (limited to 'components/style')
-rw-r--r-- | components/style/gecko/url.rs | 2 | ||||
-rw-r--r-- | components/style/media_queries/media_list.rs | 2 | ||||
-rw-r--r-- | components/style/properties/helpers.mako.rs | 14 | ||||
-rw-r--r-- | components/style/stylesheets/document_rule.rs | 2 | ||||
-rw-r--r-- | components/style/stylesheets/keyframes_rule.rs | 2 | ||||
-rw-r--r-- | components/style/values/animated/font.rs | 2 | ||||
-rw-r--r-- | components/style/values/generics/basic_shape.rs | 14 | ||||
-rw-r--r-- | components/style/values/generics/effects.rs | 2 | ||||
-rw-r--r-- | components/style/values/generics/font.rs | 2 | ||||
-rw-r--r-- | components/style/values/generics/image.rs | 2 | ||||
-rw-r--r-- | components/style/values/generics/svg.rs | 4 | ||||
-rw-r--r-- | components/style/values/generics/transform.rs | 2 |
12 files changed, 25 insertions, 25 deletions
diff --git a/components/style/gecko/url.rs b/components/style/gecko/url.rs index 678adb39b09..2e694b3a2d6 100644 --- a/components/style/gecko/url.rs +++ b/components/style/gecko/url.rs @@ -21,8 +21,8 @@ use style_traits::{CssWriter, ParseError, ToCss}; use to_shmem::{self, SharedMemoryBuilder, ToShmem}; /// A CSS url() value for gecko. -#[css(function = "url")] #[derive(Clone, Debug, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)] +#[css(function = "url")] #[repr(C)] pub struct CssUrl(pub Arc<CssUrlData>); diff --git a/components/style/media_queries/media_list.rs b/components/style/media_queries/media_list.rs index 5d150f7db99..abc2ae6dbc8 100644 --- a/components/style/media_queries/media_list.rs +++ b/components/style/media_queries/media_list.rs @@ -14,8 +14,8 @@ use cssparser::{Delimiter, Parser}; use cssparser::{ParserInput, Token}; /// A type that encapsulates a media query list. -#[css(comma, derive_debug)] #[derive(Clone, MallocSizeOf, ToCss, ToShmem)] +#[css(comma, derive_debug)] pub struct MediaList { /// The list of media queries. #[css(iterable)] diff --git a/components/style/properties/helpers.mako.rs b/components/style/properties/helpers.mako.rs index 505cd0c0856..1e6c1400a18 100644 --- a/components/style/properties/helpers.mako.rs +++ b/components/style/properties/helpers.mako.rs @@ -170,9 +170,6 @@ /// Making this type generic allows the compiler to figure out the /// animated value for us, instead of having to implement it /// manually for every type we care about. - % if separator == "Comma": - #[css(comma)] - % endif #[derive( Clone, Debug, @@ -182,6 +179,9 @@ ToResolvedValue, ToCss, )] + % if separator == "Comma": + #[css(comma)] + % endif pub struct OwnedList<T>( % if not allow_empty: #[css(iterable)] @@ -198,9 +198,6 @@ % else: pub use self::ComputedList as List; - % if separator == "Comma": - #[css(comma)] - % endif #[derive( Clone, Debug, @@ -208,6 +205,9 @@ PartialEq, ToCss, )] + % if separator == "Comma": + #[css(comma)] + % endif pub struct ComputedList( % if not allow_empty: #[css(iterable)] @@ -324,10 +324,10 @@ } /// The specified value of ${name}. + #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)] % if separator == "Comma": #[css(comma)] % endif - #[derive(Clone, Debug, MallocSizeOf, PartialEq, SpecifiedValueInfo, ToCss, ToShmem)] pub struct SpecifiedValue( % if not allow_empty: #[css(iterable)] diff --git a/components/style/stylesheets/document_rule.rs b/components/style/stylesheets/document_rule.rs index 2f8c5bc48d7..ce326808b63 100644 --- a/components/style/stylesheets/document_rule.rs +++ b/components/style/stylesheets/document_rule.rs @@ -215,8 +215,8 @@ impl DocumentMatchingFunction { /// The `@document` rule's condition is written as a comma-separated list of /// URL matching functions, and the condition evaluates to true whenever any /// one of those functions evaluates to true. -#[css(comma)] #[derive(Clone, Debug, ToCss, ToShmem)] +#[css(comma)] pub struct DocumentCondition(#[css(iterable)] Vec<DocumentMatchingFunction>); impl DocumentCondition { diff --git a/components/style/stylesheets/keyframes_rule.rs b/components/style/stylesheets/keyframes_rule.rs index 9efd7f39ccc..97394802320 100644 --- a/components/style/stylesheets/keyframes_rule.rs +++ b/components/style/stylesheets/keyframes_rule.rs @@ -149,8 +149,8 @@ impl KeyframePercentage { /// A keyframes selector is a list of percentages or from/to symbols, which are /// converted at parse time to percentages. -#[css(comma)] #[derive(Clone, Debug, Eq, PartialEq, ToCss, ToShmem)] +#[css(comma)] pub struct KeyframeSelector(#[css(iterable)] Vec<KeyframePercentage>); impl KeyframeSelector { diff --git a/components/style/values/animated/font.rs b/components/style/values/animated/font.rs index a3eb1fe1e15..1f0eb749fc7 100644 --- a/components/style/values/animated/font.rs +++ b/components/style/values/animated/font.rs @@ -116,7 +116,7 @@ impl<'a> FontSettingTagIter<'a> { let mut sorted_tags = Vec::from_iter(tags.iter()); sorted_tags.sort_by_key(|k| k.tag.0); sorted_tags - }; + } Ok(FontSettingTagIter { a_state: FontSettingTagIterState::new(as_new_sorted_tags(&a_settings.0)), diff --git a/components/style/values/generics/basic_shape.rs b/components/style/values/generics/basic_shape.rs index 60619b46e2c..5af1580ffdf 100644 --- a/components/style/values/generics/basic_shape.rs +++ b/components/style/values/generics/basic_shape.rs @@ -91,7 +91,6 @@ impl Default for ShapeBox { /// A value for the `clip-path` property. #[allow(missing_docs)] -#[animation(no_bound(U))] #[derive( Animate, Clone, @@ -106,6 +105,7 @@ impl Default for ShapeBox { ToResolvedValue, ToShmem, )] +#[animation(no_bound(U))] #[repr(u8)] pub enum GenericClipPath<BasicShape, U> { #[animation(error)] @@ -126,7 +126,6 @@ pub use self::GenericClipPath as ClipPath; /// A value for the `shape-outside` property. #[allow(missing_docs)] -#[animation(no_bound(I))] #[derive( Animate, Clone, @@ -141,6 +140,7 @@ pub use self::GenericClipPath as ClipPath; ToResolvedValue, ToShmem, )] +#[animation(no_bound(I))] #[repr(u8)] pub enum GenericShapeOutside<BasicShape, I> { #[animation(error)] @@ -193,7 +193,6 @@ pub use self::GenericBasicShape as BasicShape; /// <https://drafts.csswg.org/css-shapes/#funcdef-inset> #[allow(missing_docs)] -#[css(function = "inset")] #[derive( Animate, Clone, @@ -207,6 +206,7 @@ pub use self::GenericBasicShape as BasicShape; ToResolvedValue, ToShmem, )] +#[css(function = "inset")] #[repr(C)] pub struct InsetRect<LengthPercentage, NonNegativeLengthPercentage> { pub rect: Rect<LengthPercentage>, @@ -216,7 +216,6 @@ pub struct InsetRect<LengthPercentage, NonNegativeLengthPercentage> { /// <https://drafts.csswg.org/css-shapes/#funcdef-circle> #[allow(missing_docs)] -#[css(function)] #[derive( Animate, Clone, @@ -231,6 +230,7 @@ pub struct InsetRect<LengthPercentage, NonNegativeLengthPercentage> { ToResolvedValue, ToShmem, )] +#[css(function)] #[repr(C)] pub struct Circle<H, V, NonNegativeLengthPercentage> { pub position: GenericPosition<H, V>, @@ -239,7 +239,6 @@ pub struct Circle<H, V, NonNegativeLengthPercentage> { /// <https://drafts.csswg.org/css-shapes/#funcdef-ellipse> #[allow(missing_docs)] -#[css(function)] #[derive( Animate, Clone, @@ -254,6 +253,7 @@ pub struct Circle<H, V, NonNegativeLengthPercentage> { ToResolvedValue, ToShmem, )] +#[css(function)] #[repr(C)] pub struct Ellipse<H, V, NonNegativeLengthPercentage> { pub position: GenericPosition<H, V>, @@ -293,7 +293,6 @@ pub use self::GenericShapeRadius as ShapeRadius; /// A generic type for representing the `polygon()` function /// /// <https://drafts.csswg.org/css-shapes/#funcdef-polygon> -#[css(comma, function = "polygon")] #[derive( Clone, Debug, @@ -306,6 +305,7 @@ pub use self::GenericShapeRadius as ShapeRadius; ToResolvedValue, ToShmem, )] +#[css(comma, function = "polygon")] #[repr(C)] pub struct GenericPolygon<LengthPercentage> { /// The filling rule for a polygon. @@ -364,7 +364,6 @@ pub enum FillRule { /// The path function defined in css-shape-2. /// /// https://drafts.csswg.org/css-shapes-2/#funcdef-path -#[css(comma)] #[derive( Animate, Clone, @@ -379,6 +378,7 @@ pub enum FillRule { ToResolvedValue, ToShmem, )] +#[css(comma)] #[repr(C)] pub struct Path { /// The filling rule for the svg path. diff --git a/components/style/values/generics/effects.rs b/components/style/values/generics/effects.rs index dd9da8759be..f5666f30552 100644 --- a/components/style/values/generics/effects.rs +++ b/components/style/values/generics/effects.rs @@ -35,7 +35,6 @@ pub use self::GenericBoxShadow as BoxShadow; /// A generic value for a single `filter`. #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))] -#[animation(no_bound(U))] #[derive( Clone, ComputeSquaredDistance, @@ -49,6 +48,7 @@ pub use self::GenericBoxShadow as BoxShadow; ToResolvedValue, ToShmem, )] +#[animation(no_bound(U))] #[repr(C, u8)] pub enum GenericFilter<Angle, NonNegativeFactor, ZeroToOneFactor, Length, Shadow, U> { /// `blur(<length>)` diff --git a/components/style/values/generics/font.rs b/components/style/values/generics/font.rs index e19c796d17b..226613d4545 100644 --- a/components/style/values/generics/font.rs +++ b/components/style/values/generics/font.rs @@ -77,7 +77,6 @@ pub struct VariationValue<Number> { } /// A value both for font-variation-settings and font-feature-settings. -#[css(comma)] #[derive( Clone, Debug, @@ -90,6 +89,7 @@ pub struct VariationValue<Number> { ToResolvedValue, ToShmem, )] +#[css(comma)] pub struct FontSettings<T>(#[css(if_empty = "normal", iterable)] pub Box<[T]>); impl<T> FontSettings<T> { diff --git a/components/style/values/generics/image.rs b/components/style/values/generics/image.rs index fba1f3f3c78..6f550bc21f6 100644 --- a/components/style/values/generics/image.rs +++ b/components/style/values/generics/image.rs @@ -264,7 +264,6 @@ impl ToCss for PaintWorklet { /// /// `-moz-image-rect(<uri>, top, right, bottom, left);` #[allow(missing_docs)] -#[css(comma, function = "-moz-image-rect")] #[derive( Clone, Debug, @@ -276,6 +275,7 @@ impl ToCss for PaintWorklet { ToResolvedValue, ToShmem, )] +#[css(comma, function = "-moz-image-rect")] #[repr(C)] pub struct GenericMozImageRect<NumberOrPercentage, MozImageRectUrl> { pub url: MozImageRectUrl, diff --git a/components/style/values/generics/svg.rs b/components/style/values/generics/svg.rs index 26a33228e86..43ba77f1ff4 100644 --- a/components/style/values/generics/svg.rs +++ b/components/style/values/generics/svg.rs @@ -42,7 +42,6 @@ pub use self::GenericSVGPaintFallback as SVGPaintFallback; /// An SVG paint value /// /// <https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint> -#[animation(no_bound(Url))] #[derive( Animate, Clone, @@ -58,6 +57,7 @@ pub use self::GenericSVGPaintFallback as SVGPaintFallback; ToResolvedValue, ToShmem, )] +#[animation(no_bound(Url))] #[repr(C)] pub struct GenericSVGPaint<Color, Url> { /// The paint source. @@ -81,7 +81,6 @@ impl<C, U> Default for SVGPaint<C, U> { /// /// Whereas the spec only allows PaintServer to have a fallback, Gecko lets the /// context properties have a fallback as well. -#[animation(no_bound(U))] #[derive( Animate, Clone, @@ -98,6 +97,7 @@ impl<C, U> Default for SVGPaint<C, U> { ToResolvedValue, ToShmem, )] +#[animation(no_bound(U))] #[repr(C, u8)] pub enum GenericSVGPaintKind<C, U> { /// `none` diff --git a/components/style/values/generics/transform.rs b/components/style/values/generics/transform.rs index ef414c1f9a0..e5739b6ef56 100644 --- a/components/style/values/generics/transform.rs +++ b/components/style/values/generics/transform.rs @@ -47,7 +47,6 @@ pub use self::GenericMatrix as Matrix; #[allow(missing_docs)] #[cfg_attr(rustfmt, rustfmt_skip)] -#[css(comma, function = "matrix3d")] #[derive( Clone, Copy, @@ -62,6 +61,7 @@ pub use self::GenericMatrix as Matrix; ToResolvedValue, ToShmem, )] +#[css(comma, function = "matrix3d")] #[repr(C)] pub struct GenericMatrix3D<T> { pub m11: T, pub m12: T, pub m13: T, pub m14: T, |