diff options
Diffstat (limited to 'components/layout/multicol.rs')
-rw-r--r-- | components/layout/multicol.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/components/layout/multicol.rs b/components/layout/multicol.rs index c1773fc0c63..b5651369ebf 100644 --- a/components/layout/multicol.rs +++ b/components/layout/multicol.rs @@ -21,7 +21,7 @@ use gfx_traits::print_tree::PrintTree; use std::cmp::{min, max}; use std::fmt; use std::sync::Arc; -use style::context::{StyleContext, SharedStyleContext}; +use style::context::SharedStyleContext; use style::logical_geometry::LogicalSize; use style::properties::ServoComputedValues; use style::values::Either; @@ -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 = |