mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Switch column-count to use predefined integer type
This commit is contained in:
parent
9233882d49
commit
ab0e5c9d99
5 changed files with 22 additions and 93 deletions
|
@ -106,11 +106,14 @@ impl Flow for MulticolFlow {
|
|||
if let Either::First(column_width) = column_style.column_width {
|
||||
column_count =
|
||||
max(1, (content_inline_size + column_gap).0 / (column_width + column_gap).0);
|
||||
if let Some(specified_column_count) = column_style.column_count.0 {
|
||||
if let Either::First(specified_column_count) = column_style.column_count {
|
||||
column_count = min(column_count, specified_column_count as i32);
|
||||
}
|
||||
} else {
|
||||
column_count = column_style.column_count.0.unwrap() as i32;
|
||||
column_count = match column_style.column_count {
|
||||
Either::First(n) => n,
|
||||
_ => unreachable!(),
|
||||
}
|
||||
}
|
||||
column_width =
|
||||
max(Au(0), (content_inline_size + column_gap) / column_count - column_gap);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue