Implement Calc for LengthOrPercentageOrAuto

This commit is contained in:
David Zbarsky 2015-08-11 21:08:05 -04:00
parent 9556141e57
commit cb4d878169
7 changed files with 44 additions and 0 deletions

View file

@ -272,6 +272,7 @@ impl Flow for TableRowFlow {
let child_column_inline_size = ColumnIntrinsicInlineSize {
minimum_length: match child_specified_inline_size {
LengthOrPercentageOrAuto::Auto |
LengthOrPercentageOrAuto::Calc(_) |
LengthOrPercentageOrAuto::Percentage(_) => {
child_base.intrinsic_inline_sizes.minimum_inline_size
}
@ -279,6 +280,7 @@ impl Flow for TableRowFlow {
},
percentage: match child_specified_inline_size {
LengthOrPercentageOrAuto::Auto |
LengthOrPercentageOrAuto::Calc(_) |
LengthOrPercentageOrAuto::Length(_) => 0.0,
LengthOrPercentageOrAuto::Percentage(percentage) => percentage,
},
@ -286,6 +288,7 @@ impl Flow for TableRowFlow {
constrained: match child_specified_inline_size {
LengthOrPercentageOrAuto::Length(_) => true,
LengthOrPercentageOrAuto::Auto |
LengthOrPercentageOrAuto::Calc(_) |
LengthOrPercentageOrAuto::Percentage(_) => false,
},
};