Update layout component and helper to use LengthOrNormal

This commit is contained in:
Nick Price 2016-12-09 18:30:12 -05:00
parent 731706041d
commit 64a95f6410
3 changed files with 16 additions and 86 deletions

View file

@ -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 =