Remove some uses of trivial_to_computed_value

This commit is contained in:
Anthony Ramine 2018-03-09 11:35:46 +01:00
parent 491a79ee4e
commit afaa00a344
7 changed files with 8 additions and 21 deletions

View file

@ -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);

View file

@ -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")?;

View file

@ -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

View file

@ -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,

View file

@ -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