aboutsummaryrefslogtreecommitdiffstats
path: root/components/layout/table.rs
diff options
context:
space:
mode:
authorManish Goregaokar <manishsmail@gmail.com>2018-02-27 14:47:22 -0800
committerManish Goregaokar <manishsmail@gmail.com>2018-02-27 14:47:22 -0800
commitcec37a492a8e27ed8c0c8e00157190a0a87cb882 (patch)
treeeb7b1d96472e2574601df0f9d7b443760930ceb0 /components/layout/table.rs
parent98e53db289527803db269a2ced34b59ef8b6230f (diff)
downloadservo-cec37a492a8e27ed8c0c8e00157190a0a87cb882.tar.gz
servo-cec37a492a8e27ed8c0c8e00157190a0a87cb882.zip
Unconditionally layout rows when laying out tables
If the reflow flag is set on a row it will be on the table anyway
Diffstat (limited to 'components/layout/table.rs')
-rw-r--r--components/layout/table.rs16
1 files changed, 4 insertions, 12 deletions
diff --git a/components/layout/table.rs b/components/layout/table.rs
index 2e0df9f4c7e..2f5de2aa1e4 100644
--- a/components/layout/table.rs
+++ b/components/layout/table.rs
@@ -840,26 +840,18 @@ impl TableLikeFlow for BlockFlow {
// [expensive: iterates over cells]
// At this point, `current_block_offset` is at the content edge of our box. Now iterate
// over children.
- let mut effects_rows = 0;
let mut i = 0;
for kid in self.base.child_iter_mut() {
if kid.is_table_row() {
has_rows = true;
let row = kid.as_mut_table_row();
- if row.mut_base().restyle_damage.contains(ServoRestyleDamage::REFLOW) ||
- effects_rows != 0 {
- row.assign_block_size_to_self_and_children(&sizes, i, &mut effects_rows);
- row.mut_base().restyle_damage
- .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
- ServoRestyleDamage::REFLOW);
- }
+ row.assign_block_size_to_self_and_children(&sizes, i);
+ row.mut_base().restyle_damage
+ .remove(ServoRestyleDamage::REFLOW_OUT_OF_FLOW |
+ ServoRestyleDamage::REFLOW);
current_block_offset = current_block_offset +
border_spacing_for_row(&self.fragment, row,
block_direction_spacing);
- // may happen for empty rows
- if effects_rows != 0 {
- effects_rows -= 1;
- }
i += 1;
}