Skip to content

Commit

Permalink
Simplify propagation of column sizes from TableWrapperFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Dec 14, 2016
1 parent 9700b0e commit 622d43d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
4 changes: 0 additions & 4 deletions components/layout/table_row.rs
Expand Up @@ -751,10 +751,6 @@ pub fn propagate_column_inline_sizes_to_child(
//
// FIXME(pcwalton): This seems inefficient. Reference count it instead?
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 => {
let child_table_rowgroup_flow = child_flow.as_mut_table_rowgroup();
child_table_rowgroup_flow.spacing = *border_spacing;
Expand Down
19 changes: 5 additions & 14 deletions components/layout/table_wrapper.rs
Expand Up @@ -37,7 +37,6 @@ use style::properties::ServoComputedValues;
use style::values::CSSFloat;
use style::values::computed::LengthOrPercentageOrAuto;
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize};
use table_row;

#[derive(Copy, Clone, Serialize, Debug)]
pub enum TableLayout {
Expand Down Expand Up @@ -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 {
None => {
self.block_flow
Expand All @@ -410,18 +408,11 @@ impl Flow for TableWrapperFlow {
inline_start_content_edge,
inline_end_content_edge,
content_inline_size,
|child_flow,
_child_index,
_content_inline_size,
writing_mode,
_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![]);
|child_flow, _, _, _, _, _| {
if child_flow.class() == FlowClass::Table {
child_flow.as_mut_table().column_computed_inline_sizes =
assigned_column_inline_sizes.to_vec();
}
})
}
}
Expand Down

0 comments on commit 622d43d

Please sign in to comment.