Skip to content

Commit

Permalink
Bug 1502185 - Don't allow auto in grid line names. r=mats
Browse files Browse the repository at this point in the history
  • Loading branch information
emilio committed Nov 5, 2018
1 parent 77967ff commit 34feb3a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion components/style/values/generics/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ impl Parse for GridLine<specified::Integer> {
if val_before_span || grid_line.ident.is_some() {
return Err(location.new_custom_error(StyleParseErrorKind::UnspecifiedError));
}
grid_line.ident = Some(CustomIdent::from_ident(location, &name, &[])?);
// NOTE(emilio): `span` is consumed above, so we only need to
// reject `auto`.
grid_line.ident = Some(CustomIdent::from_ident(location, &name, &["auto"])?);
} else {
break;
}
Expand Down
2 changes: 1 addition & 1 deletion components/style/values/specified/grid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub fn parse_line_names<'i, 't>(
while let Ok((loc, ident)) = input.try(|i| -> Result<_, CssParseError<()>> {
Ok((i.current_source_location(), i.expect_ident_cloned()?))
}) {
let ident = CustomIdent::from_ident(loc, &ident, &["span"])?;
let ident = CustomIdent::from_ident(loc, &ident, &["span", "auto"])?;
values.push(ident);
}

Expand Down

0 comments on commit 34feb3a

Please sign in to comment.