Always call compute_block_size_table_row_base

This commit is contained in:
Manish Goregaokar 2018-02-26 19:26:41 -08:00
parent 216082c342
commit 7cd3daa76f

View file

@ -27,7 +27,6 @@ use style::computed_values::border_spacing::T as BorderSpacing;
use style::computed_values::border_top_style::T as BorderStyle;
use style::logical_geometry::{LogicalSize, PhysicalSide, WritingMode};
use style::properties::ComputedValues;
use style::servo::restyle_damage::ServoRestyleDamage;
use style::values::computed::{Color, LengthOrPercentageOrAuto};
use table::{ColumnComputedInlineSize, ColumnIntrinsicInlineSize, InternalTable, VecExt};
use table_cell::{CollapsedBordersForCell, TableCellFlow};
@ -114,8 +113,10 @@ impl TableRowFlow {
/// inline(always) because this is only ever called by in-order or non-in-order top-level
/// methods
#[inline(always)]
pub fn compute_block_size_table_row_base<'a>(&'a mut self, layout_context: &LayoutContext, incoming_rowspan_data: &mut Vec<Au>) -> Au {
if self.block_flow.base.restyle_damage.contains(ServoRestyleDamage::REFLOW) {
pub fn compute_block_size_table_row_base<'a>(&'a mut self, layout_context: &LayoutContext,
incoming_rowspan_data: &mut Vec<Au>) -> Au {
// XXXManishearth skip this when the REFLOW flag is unset if it is not affected by other
// rows
fn include_sizes_from_previous_rows(col: &mut usize,
incoming_rowspan: &[u32],
incoming_rowspan_data: &mut Vec<Au>,
@ -138,7 +139,8 @@ impl TableRowFlow {
let mut col = 0;
for kid in self.block_flow.base.child_iter_mut() {
include_sizes_from_previous_rows(&mut col, &self.incoming_rowspan, incoming_rowspan_data, &mut max_block_size);
include_sizes_from_previous_rows(&mut col, &self.incoming_rowspan,
incoming_rowspan_data, &mut max_block_size);
kid.place_float_if_applicable();
if !kid.base().flags.is_float() {
kid.assign_block_size_for_inorder_child_if_necessary(layout_context,
@ -181,9 +183,6 @@ impl TableRowFlow {
MaybeAuto::Specified(value) => max(value, block_size),
};
block_size
} else {
self.block_flow.base.position.size.block
}
}
pub fn assign_block_size_to_self_and_children(&mut self, sizes: &[Au], index: usize, effects_rows: &mut u32) {