mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Update layout component and helper to use LengthOrNormal
This commit is contained in:
parent
731706041d
commit
64a95f6410
3 changed files with 16 additions and 86 deletions
|
@ -99,9 +99,11 @@ impl Flow for MulticolFlow {
|
|||
{
|
||||
let column_style = self.block_flow.fragment.style.get_column();
|
||||
|
||||
// `None` is 'normal': "UA-specified length. A value of 1em is suggested."
|
||||
let column_gap = column_style.column_gap.0.unwrap_or_else(||
|
||||
self.block_flow.fragment.style.get_font().font_size);
|
||||
let column_gap = match column_style.column_gap {
|
||||
Either::First(len) => len,
|
||||
Either::Second(_normal) => self.block_flow.fragment.style.get_font().font_size,
|
||||
};
|
||||
|
||||
let mut column_count;
|
||||
if let Either::First(column_width) = column_style.column_width {
|
||||
column_count =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue