From a3bfa5db3e1d19dfd352987b1e4f109110098ca4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sat, 9 Sep 2017 14:38:38 +0200 Subject: [PATCH] style: Get rid of a few ComputedValueAsSpecified in grid. Need Box to remove the macro invocation. --- components/style/values/generics/grid.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/components/style/values/generics/grid.rs b/components/style/values/generics/grid.rs index 5a05b318733..cd828c28a00 100644 --- a/components/style/values/generics/grid.rs +++ b/components/style/values/generics/grid.rs @@ -10,7 +10,7 @@ use parser::{Parse, ParserContext}; use std::{fmt, mem, usize}; use style_traits::{ToCss, ParseError, StyleParseError}; use values::{CSSFloat, CustomIdent, serialize_dimension}; -use values::computed::{ComputedValueAsSpecified, Context, ToComputedValue}; +use values::computed::{Context, ToComputedValue}; use values::specified; use values::specified::grid::parse_line_names; @@ -471,7 +471,7 @@ pub enum TrackListValue { /// The type of a `` as determined during parsing. /// /// https://drafts.csswg.org/css-grid/#typedef-track-list -#[derive(Clone, Copy, Debug, PartialEq)] +#[derive(Clone, Copy, Debug, PartialEq, ToComputedValue)] #[cfg_attr(feature = "servo", derive(HeapSizeOf))] pub enum TrackListType { /// [``](https://drafts.csswg.org/css-grid/#typedef-auto-track-list) @@ -491,8 +491,6 @@ pub enum TrackListType { Explicit, } -impl ComputedValueAsSpecified for TrackListType {} - /// A grid `` type. /// /// https://drafts.csswg.org/css-grid/#typedef-track-list @@ -573,6 +571,8 @@ pub struct LineNameList { pub fill_idx: Option, } +trivial_to_computed_value!(LineNameList); + impl Parse for LineNameList { fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result> { input.expect_ident_matching("subgrid")?; @@ -655,8 +655,6 @@ impl ToCss for LineNameList { } } -impl ComputedValueAsSpecified for LineNameList {} - /// Variants for ` | ` /// Subgrid deferred to Level 2 spec due to lack of implementation. /// But it's implemented in gecko, so we have to as well.