diff --git a/components/layout/table.rs b/components/layout/table.rs index fee95d1af7a..b8e491479ed 100644 --- a/components/layout/table.rs +++ b/components/layout/table.rs @@ -1147,6 +1147,8 @@ impl<'table> Iterator for TableCellStyleIterator<'table> { impl<'table> TableCellStyleInfo<'table> { fn build_display_list(&self, mut state: &mut DisplayListBuildState) { + use style::computed_values::visibility::T as Visibility; + if !self.cell.visible || self.cell.block_flow.fragment.style() .get_inheritedbox().visibility != Visibility::Visible { return diff --git a/components/layout/table_cell.rs b/components/layout/table_cell.rs index 65e613dfbd2..f3bbe14f2e7 100644 --- a/components/layout/table_cell.rs +++ b/components/layout/table_cell.rs @@ -251,11 +251,9 @@ impl Flow for TableCellFlow { // This is handled by TableCellStyleInfo::build_display_list() // when the containing table builds its display list - if self.visible { - // we skip setting the damage in TableCellStyleInfo::build_display_list() - // because we only have immutable access - self.block_flow.fragment.restyle_damage.remove(ServoRestyleDamage::REPAINT); - } + // we skip setting the damage in TableCellStyleInfo::build_display_list() + // because we only have immutable access + self.block_flow.fragment.restyle_damage.remove(ServoRestyleDamage::REPAINT); } fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) { diff --git a/components/layout/table_row.rs b/components/layout/table_row.rs index be83f6321e3..75fff53a969 100644 --- a/components/layout/table_row.rs +++ b/components/layout/table_row.rs @@ -467,7 +467,11 @@ impl Flow for TableRowFlow { } fn build_display_list(&mut self, _: &mut DisplayListBuildState) { + use style::servo::restyle_damage::ServoRestyleDamage; // handled in TableCellStyleInfo::build_display_list + // we skip setting the damage in TableCellStyleInfo::build_display_list() + // because we only have immutable access + self.block_flow.fragment.restyle_damage.remove(ServoRestyleDamage::REPAINT); } fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) { diff --git a/components/layout/table_rowgroup.rs b/components/layout/table_rowgroup.rs index 7ce2205c745..49b0d427084 100644 --- a/components/layout/table_rowgroup.rs +++ b/components/layout/table_rowgroup.rs @@ -176,9 +176,12 @@ impl Flow for TableRowGroupFlow { self.block_flow.update_late_computed_block_position_if_necessary(block_position) } - fn build_display_list(&mut self, state: &mut DisplayListBuildState) { - debug!("build_display_list_table_rowgroup: same process as block flow"); - self.block_flow.build_display_list(state); + fn build_display_list(&mut self, _: &mut DisplayListBuildState) { + use style::servo::restyle_damage::ServoRestyleDamage; + + // we skip setting the damage in TableCellStyleInfo::build_display_list() + // because we only have immutable access + self.block_flow.fragment.restyle_damage.remove(ServoRestyleDamage::REPAINT); } fn collect_stacking_contexts(&mut self, state: &mut StackingContextCollectionState) {