From f4eccdae3fa2ae27d20bc7ffb8250781182774f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naz=C4=B1m=20Can=20Alt=C4=B1nova?= Date: Mon, 3 Jul 2017 11:35:19 -0700 Subject: [PATCH] Fall back to an older version of the spec in TrackRepeat for the parity with gecko --- components/style/values/specified/grid.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/style/values/specified/grid.rs b/components/style/values/specified/grid.rs index af2f4a70c22..1be04015792 100644 --- a/components/style/values/specified/grid.rs +++ b/components/style/values/specified/grid.rs @@ -143,6 +143,16 @@ impl TrackRepeat { values.push(track_size); names.push(current_names); + if is_auto { + // FIXME: In the older version of the spec + // (https://www.w3.org/TR/2015/WD-css-grid-1-20150917/#typedef-auto-repeat), + // if the repeat type is `` we shouldn't try to parse more than + // one `TrackSize`. But in current version of the spec, this is deprecated + // but we are adding this for gecko parity. We should remove this when + // gecko implements new spec. + names.push(input.try(parse_line_names).unwrap_or(vec![])); + break + } } else { if values.is_empty() { // expecting at least one