diff options
Diffstat (limited to 'components/layout/table_wrapper.rs')
-rw-r--r-- | components/layout/table_wrapper.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/components/layout/table_wrapper.rs b/components/layout/table_wrapper.rs index 7369acbbf4c..8a3e368d140 100644 --- a/components/layout/table_wrapper.rs +++ b/components/layout/table_wrapper.rs @@ -305,7 +305,7 @@ impl Flow for TableWrapperFlow { self.compute_used_inline_size(layout_context, containing_block_inline_size, - intermediate_column_inline_sizes.as_slice()); + &intermediate_column_inline_sizes); if let TableLayout::Auto = self.table_layout { self.calculate_table_column_sizes_for_automatic_layout( @@ -590,7 +590,7 @@ impl SelectedAutoLayoutCandidateGuess { /// Computes the weight needed to linearly interpolate `middle` between two guesses `low` and /// `high` as specified by INTRINSIC § 4.3. fn weight(low: Au, middle: Au, high: Au) -> CSSFloat { - (middle - low).to_subpx() / (high - low).to_subpx() + (middle - low).to_f32_px() / (high - low).to_f32_px() } /// Linearly interpolates between two guesses, as specified by INTRINSIC § 4.3. @@ -653,9 +653,9 @@ impl ExcessInlineSizeDistributionInfo { // do? if !column_intrinsic_inline_size.constrained && column_intrinsic_inline_size.percentage == 0.0 { - column_intrinsic_inline_size.preferred.to_subpx() / + column_intrinsic_inline_size.preferred.to_f32_px() / self.preferred_inline_size_of_nonconstrained_columns_with_no_percentage - .to_subpx() + .to_f32_px() } else { 0.0 } @@ -663,8 +663,8 @@ impl ExcessInlineSizeDistributionInfo { 1.0 / (self.count_of_nonconstrained_columns_with_no_percentage as CSSFloat) } else if self.preferred_inline_size_of_constrained_columns_with_no_percentage > Au(0) { - column_intrinsic_inline_size.preferred.to_subpx() / - self.preferred_inline_size_of_constrained_columns_with_no_percentage.to_subpx() + column_intrinsic_inline_size.preferred.to_f32_px() / + self.preferred_inline_size_of_constrained_columns_with_no_percentage.to_f32_px() } else if self.total_percentage > 0.0 { column_intrinsic_inline_size.percentage / self.total_percentage } else { @@ -684,7 +684,7 @@ impl ExcessInlineSizeDistributionInfo { /// An intermediate column size assignment. struct IntermediateColumnInlineSize { size: Au, - percentage: f64, + percentage: f32, } fn initial_computed_inline_size(block: &mut BlockFlow, @@ -695,11 +695,10 @@ fn initial_computed_inline_size(block: &mut BlockFlow, containing_block_inline_size); match inline_size_from_style { MaybeAuto::Auto => { - MaybeAuto::Specified(Au::max(containing_block_inline_size, - minimum_width_of_all_columns)) + MaybeAuto::Specified(max(containing_block_inline_size, minimum_width_of_all_columns)) } MaybeAuto::Specified(inline_size_from_style) => { - MaybeAuto::Specified(Au::max(inline_size_from_style, minimum_width_of_all_columns)) + MaybeAuto::Specified(max(inline_size_from_style, minimum_width_of_all_columns)) } } } |