diff options
-rw-r--r-- | components/style/gecko/url.rs | 6 | ||||
-rw-r--r-- | components/style/properties/helpers/animated_properties.mako.rs | 4 | ||||
-rw-r--r-- | components/style/values/computed/mod.rs | 1 | ||||
-rw-r--r-- | components/style/values/generics/grid.rs | 4 | ||||
-rw-r--r-- | components/style/values/generics/image.rs | 4 | ||||
-rw-r--r-- | components/style/values/specified/mod.rs | 2 | ||||
-rw-r--r-- | components/style/values/specified/position.rs | 8 |
7 files changed, 8 insertions, 21 deletions
diff --git a/components/style/gecko/url.rs b/components/style/gecko/url.rs index e737b29926b..2642e174b01 100644 --- a/components/style/gecko/url.rs +++ b/components/style/gecko/url.rs @@ -121,7 +121,7 @@ impl MallocSizeOf for CssUrl { } /// A specified url() value for general usage. -#[derive(Clone, Debug, ToCss)] +#[derive(Clone, Debug, ToComputedValue, ToCss)] pub struct SpecifiedUrl { /// The specified url value. pub url: CssUrl, @@ -130,7 +130,6 @@ pub struct SpecifiedUrl { #[css(skip)] pub url_value: RefPtr<URLValue>, } -trivial_to_computed_value!(SpecifiedUrl); impl SpecifiedUrl { fn from_css_url(url: CssUrl) -> Self { @@ -177,7 +176,7 @@ impl MallocSizeOf for SpecifiedUrl { /// A specified url() value for image. /// /// This exists so that we can construct `ImageValue` and reuse it. -#[derive(Clone, Debug, ToCss)] +#[derive(Clone, Debug, ToComputedValue, ToCss)] pub struct SpecifiedImageUrl { /// The specified url value. pub url: CssUrl, @@ -186,7 +185,6 @@ pub struct SpecifiedImageUrl { #[css(skip)] pub image_value: RefPtr<ImageValue>, } -trivial_to_computed_value!(SpecifiedImageUrl); impl SpecifiedImageUrl { fn from_css_url(url: CssUrl) -> Self { diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 02fe6b2ba0e..570658c5301 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -78,7 +78,7 @@ pub fn nscsspropertyid_is_animatable(property: nsCSSPropertyID) -> bool { /// a shorthand with at least one transitionable longhand component, or an unsupported property. // NB: This needs to be here because it needs all the longhands generated // beforehand. -#[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, ToCss)] +#[derive(Clone, Debug, Eq, Hash, MallocSizeOf, PartialEq, ToComputedValue, ToCss)] pub enum TransitionProperty { /// A shorthand. Shorthand(ShorthandId), @@ -89,8 +89,6 @@ pub enum TransitionProperty { Unsupported(CustomIdent), } -trivial_to_computed_value!(TransitionProperty); - impl TransitionProperty { /// Returns `all`. #[inline] diff --git a/components/style/values/computed/mod.rs b/components/style/values/computed/mod.rs index 1667f7ec8cf..ff16e328826 100644 --- a/components/style/values/computed/mod.rs +++ b/components/style/values/computed/mod.rs @@ -428,7 +428,6 @@ trivial_to_computed_value!(u8); trivial_to_computed_value!(u16); trivial_to_computed_value!(u32); trivial_to_computed_value!(Atom); -trivial_to_computed_value!(BorderStyle); trivial_to_computed_value!(CursorKind); #[cfg(feature = "servo")] trivial_to_computed_value!(Prefix); diff --git a/components/style/values/generics/grid.rs b/components/style/values/generics/grid.rs index 2b519f1aa85..cc3256df7ab 100644 --- a/components/style/values/generics/grid.rs +++ b/components/style/values/generics/grid.rs @@ -566,7 +566,7 @@ impl<L: ToCss, I: ToCss> ToCss for TrackList<L, I> { /// /// `subgrid [ <line-names> | repeat(<positive-integer> | auto-fill, <line-names>+) ]+` /// Old spec: https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-line-name-list -#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq)] +#[derive(Clone, Debug, Default, MallocSizeOf, PartialEq, ToComputedValue)] pub struct LineNameList { /// The optional `<line-name-list>` pub names: Box<[Box<[CustomIdent]>]>, @@ -574,8 +574,6 @@ pub struct LineNameList { pub fill_idx: Option<u32>, } -trivial_to_computed_value!(LineNameList); - impl Parse for LineNameList { fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> { input.expect_ident_matching("subgrid")?; diff --git a/components/style/values/generics/image.rs b/components/style/values/generics/image.rs index 75751e39621..7f02fdec4f4 100644 --- a/components/style/values/generics/image.rs +++ b/components/style/values/generics/image.rs @@ -132,8 +132,8 @@ pub struct ColorStop<Color, LengthOrPercentage> { /// Specified values for a paint worklet. /// <https://drafts.css-houdini.org/css-paint-api/> -#[derive(Clone, Debug, PartialEq)] #[cfg_attr(feature = "servo", derive(MallocSizeOf))] +#[derive(Clone, Debug, PartialEq, ToComputedValue)] pub struct PaintWorklet { /// The name the worklet was registered with. pub name: Atom, @@ -143,8 +143,6 @@ pub struct PaintWorklet { pub arguments: Vec<Arc<custom_properties::SpecifiedValue>>, } -trivial_to_computed_value!(PaintWorklet); - impl ToCss for PaintWorklet { fn to_css<W>(&self, dest: &mut CssWriter<W>) -> fmt::Result where diff --git a/components/style/values/specified/mod.rs b/components/style/values/specified/mod.rs index 192c22a0a13..f0703699eaf 100644 --- a/components/style/values/specified/mod.rs +++ b/components/style/values/specified/mod.rs @@ -158,7 +158,7 @@ fn parse_number_with_clamping_mode<'i, 't>( #[allow(missing_docs)] #[cfg_attr(feature = "servo", derive(Deserialize, Serialize))] #[derive(Clone, Copy, Debug, Eq, MallocSizeOf, Ord, Parse, PartialEq)] -#[derive(PartialOrd, ToCss)] +#[derive(PartialOrd, ToComputedValue, ToCss)] pub enum BorderStyle { None = -1, Solid = 6, diff --git a/components/style/values/specified/position.rs b/components/style/values/specified/position.rs index 1f337560488..4a614aa1e03 100644 --- a/components/style/values/specified/position.rs +++ b/components/style/values/specified/position.rs @@ -509,7 +509,7 @@ impl From<GridAutoFlow> for u8 { } #[cfg_attr(feature = "gecko", derive(MallocSizeOf))] -#[derive(Clone, Debug, PartialEq, ToCss)] +#[derive(Clone, Debug, PartialEq, ToComputedValue, ToCss)] /// https://drafts.csswg.org/css-grid/#named-grid-area pub struct TemplateAreas { /// `named area` containing for each template area @@ -614,10 +614,8 @@ impl Parse for TemplateAreas { } } -trivial_to_computed_value!(TemplateAreas); - /// Arc type for `Arc<TemplateAreas>` -#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToCss)] +#[derive(Clone, Debug, MallocSizeOf, PartialEq, ToComputedValue, ToCss)] pub struct TemplateAreasArc(#[ignore_malloc_size_of = "Arc"] pub Arc<TemplateAreas>); impl Parse for TemplateAreasArc { @@ -631,8 +629,6 @@ impl Parse for TemplateAreasArc { } } -trivial_to_computed_value!(TemplateAreasArc); - #[cfg_attr(feature = "gecko", derive(MallocSizeOf))] #[derive(Clone, Debug, PartialEq)] /// Not associated with any particular grid item, but can |