Simplify propagation of column sizes from TableWrapperFlow

This commit is contained in:
Matt Brubeck 2016-12-08 15:49:42 -08:00
parent 9700b0e8b3
commit 622d43da8a
2 changed files with 5 additions and 18 deletions

View file

@ -751,10 +751,6 @@ pub fn propagate_column_inline_sizes_to_child(
// //
// FIXME(pcwalton): This seems inefficient. Reference count it instead? // FIXME(pcwalton): This seems inefficient. Reference count it instead?
match child_flow.class() { match child_flow.class() {
FlowClass::Table => {
let child_table_flow = child_flow.as_mut_table();
child_table_flow.column_computed_inline_sizes = column_computed_inline_sizes.to_vec();
}
FlowClass::TableRowGroup => { FlowClass::TableRowGroup => {
let child_table_rowgroup_flow = child_flow.as_mut_table_rowgroup(); let child_table_rowgroup_flow = child_flow.as_mut_table_rowgroup();
child_table_rowgroup_flow.spacing = *border_spacing; child_table_rowgroup_flow.spacing = *border_spacing;

View file

@ -37,7 +37,6 @@ use style::properties::ServoComputedValues;
use style::values::CSSFloat; use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto; use style::values::computed::LengthOrPercentageOrAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize}; use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
use table_row;
#[derive(Copy, Clone, Serialize, Debug)] #[derive(Copy, Clone, Serialize, Debug)]
pub enum TableLayout { pub enum TableLayout {
@ -394,7 +393,6 @@ impl Flow for TableWrapperFlow {
} }
}; };
let border_spacing = self.block_flow.fragment.style().get_inheritedtable().border_spacing;
match assigned_column_inline_sizes { match assigned_column_inline_sizes {
None => { None => {
self.block_flow self.block_flow
@ -410,18 +408,11 @@ impl Flow for TableWrapperFlow {
inline_start_content_edge, inline_start_content_edge,
inline_end_content_edge, inline_end_content_edge,
content_inline_size, content_inline_size,
|child_flow, |child_flow, _, _, _, _, _| {
_child_index, if child_flow.class() == FlowClass::Table {
_content_inline_size, child_flow.as_mut_table().column_computed_inline_sizes =
writing_mode, assigned_column_inline_sizes.to_vec();
_inline_start_margin_edge, }
_inline_end_margin_edge| {
table_row::propagate_column_inline_sizes_to_child(
child_flow,
writing_mode,
assigned_column_inline_sizes,
&border_spacing,
&mut vec![]);
}) })
} }
} }