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.