Bug 1374233 - Part 6: Add PositiveInteger and PositiveIntegerOrAuto for column-count.

column-count should be a positive integer or auto.

MozReview-Commit-ID: 9LFvrYo8De5
This commit is contained in:
Boris Chiou 2017-07-20 17:32:56 +08:00
parent 190cd5b952
commit 9d69cb2866
7 changed files with 49 additions and 9 deletions

View file

@ -107,11 +107,11 @@ impl Flow for MulticolFlow {
column_count =
max(1, (content_inline_size + column_gap).0 / (column_width.0 + column_gap).0);
if let Either::First(specified_column_count) = column_style.column_count {
column_count = min(column_count, specified_column_count as i32);
column_count = min(column_count, specified_column_count.0 as i32);
}
} else {
column_count = match column_style.column_count {
Either::First(n) => n,
Either::First(n) => n.0,
_ => unreachable!(),
}
}