Add support for percentages in column-gap.

This commit is contained in:
Ramshell 2018-04-05 21:04:29 -03:00
parent 044f19d914
commit d588590ed2
2 changed files with 2 additions and 3 deletions

View file

@ -106,9 +106,8 @@ impl Flow for MulticolFlow {
{ {
let column_style = self.block_flow.fragment.style.get_column(); let column_style = self.block_flow.fragment.style.get_column();
// FIXME(#20498): This should support percentages too.
let column_gap = match column_style.column_gap { let column_gap = match column_style.column_gap {
Either::First(len) => len.into(), Either::First(len) => len.0.to_pixel_length(content_inline_size).into(),
Either::Second(_normal) => self.block_flow.fragment.style.get_font().font_size.size(), Either::Second(_normal) => self.block_flow.fragment.style.get_font().font_size.size(),
}; };

View file

@ -32,7 +32,7 @@ ${helpers.predefined_type(
<% <%
# FIXME(#20498): Servo should support percentages in column-gap. # FIXME(#20498): Servo should support percentages in column-gap.
col_gap_type = "NonNegativeLengthOrPercentageOrNormal" if product == "gecko" else "NonNegativeLengthOrNormal" col_gap_type = "NonNegativeLengthOrPercentageOrNormal"
%> %>
${helpers.predefined_type( ${helpers.predefined_type(
"column-gap", "column-gap",