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
See w3c/csswg-drafts#2856.

Differential Revision: https://phabricator.services.mozilla.com/D9882

--HG--
extra : moz-landing-system : lando
  • Loading branch information
emilio committed Oct 28, 2018
1 parent 0909ebd commit 968454a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 19 deletions.
2 changes: 1 addition & 1 deletion layout/style/test/property_database.js
Original file line number Diff line number Diff line change
Expand Up @@ -6687,7 +6687,7 @@ gCSSProperties["grid-template-columns"] = {
if (isGridTemplateSubgridValueEnabled) {
gCSSProperties["grid-template-columns"].other_values.push(
// See https://bugzilla.mozilla.org/show_bug.cgi?id=981300
"[none auto subgrid min-content max-content foo] 40px",
"[none subgrid min-content max-content foo] 40px",

"subgrid",
"subgrid [] [foo bar]",
Expand Down
4 changes: 3 additions & 1 deletion servo/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 servo/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

This file was deleted.

0 comments on commit 968454a

Please sign in to comment.