mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Get rid of a few ComputedValueAsSpecified in grid.
Need Box to remove the macro invocation.
This commit is contained in:
parent
4c283fbed6
commit
a3bfa5db3e
1 changed files with 4 additions and 6 deletions
|
@ -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<LengthOrPercentage, Integer> {
|
|||
/// The type of a `<track-list>` 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 {
|
||||
/// [`<auto-track-list>`](https://drafts.csswg.org/css-grid/#typedef-auto-track-list)
|
||||
|
@ -491,8 +491,6 @@ pub enum TrackListType {
|
|||
Explicit,
|
||||
}
|
||||
|
||||
impl ComputedValueAsSpecified for TrackListType {}
|
||||
|
||||
/// A grid `<track-list>` type.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-grid/#typedef-track-list
|
||||
|
@ -573,6 +571,8 @@ 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")?;
|
||||
|
@ -655,8 +655,6 @@ impl ToCss for LineNameList {
|
|||
}
|
||||
}
|
||||
|
||||
impl ComputedValueAsSpecified for LineNameList {}
|
||||
|
||||
/// Variants for `<grid-template-rows> | <grid-template-columns>`
|
||||
/// Subgrid deferred to Level 2 spec due to lack of implementation.
|
||||
/// But it's implemented in gecko, so we have to as well.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue