From d110d8710a7e5e61891810ee7263292b4901a5c8 Mon Sep 17 00:00:00 2001 From: Oriol Brufau Date: Sat, 28 Sep 2024 02:35:41 -0700 Subject: [PATCH] Don't recompute percentage contribution for table row (#33575) We already computed it as part of the row measure. Signed-off-by: Oriol Brufau --- components/layout_2020/table/layout.rs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/components/layout_2020/table/layout.rs b/components/layout_2020/table/layout.rs index 143ab82db2b..9f6e4c57e79 100644 --- a/components/layout_2020/table/layout.rs +++ b/components/layout_2020/table/layout.rs @@ -1371,14 +1371,7 @@ impl<'a> TableLayout<'a> { .get_row_measure_for_row_at_index(writing_mode, row_index); row_sizes[row_index].max_assign(row_measure.content_sizes.min_content); - let mut percentage = match self.table.rows.get(row_index) { - Some(row) => { - get_size_percentage_contribution_from_style(&row.style, writing_mode) - .block - .0 - }, - None => 0., - }; + let mut percentage = row_measure.percentage.0; for column_index in 0..self.table.size.width { let cell_percentage = self.cell_measures[row_index][column_index] .block