Bug 1341507 part 6 - Enable multiple grid repeat values in Servo r=emilio

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Emily McDonough 2020-03-18 22:44:41 +00:00
Родитель cd299acef9
Коммит 8cc2cae246
3 изменённых файлов: 1 добавлений и 21 удалений

Просмотреть файл

@ -1277,9 +1277,7 @@ struct nsGridContainerFrame::TrackSizingFunctions {
if (!repeat.count.IsNumber()) {
MOZ_ASSERT(i == mRepeatAutoStart);
mRepeatAutoStart = mExpandedTracks.Length();
// The + 1 indicates the number of values in the repeat.
// TODO: This will need to be updated in bug 1341507
mRepeatAutoEnd = mRepeatAutoStart + 1;
mRepeatAutoEnd = mRepeatAutoStart + repeat.track_sizes.Length();
mExpandedTracks.AppendElement(std::make_pair(i, size_t(0)));
continue;
}

Просмотреть файл

@ -696,14 +696,6 @@ impl Parse for LineNameList {
.take(num.value() as usize * names_list.len()),
),
RepeatCount::AutoFill if fill_data.is_none() => {
// `repeat(autof-fill, ..)` should have just one line name.
// FIXME(bug 1341507) the above comment is wrong per:
// https://drafts.csswg.org/css-grid-2/#typedef-name-repeat
if names_list.len() != 1 {
return Err(
input.new_custom_error(StyleParseErrorKind::UnspecifiedError)
);
}
let fill_idx = line_names.len();
let fill_len = names_list.len();
fill_data = Some((fill_idx, fill_len));

Просмотреть файл

@ -185,16 +185,6 @@ impl TrackRepeat<LengthPercentage, Integer> {
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 `<auto-repeat>` 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_default());
break;
}
} else {
if values.is_empty() {
// expecting at least one <track-size>