Don't shrink table columns when handling cells with greater spanning (#32458)

For example:
```html
<table border="1">
  <tr>  <td></td>  <td></td>  </tr>
  <tr>  <td colspan="2"></td>  </tr>
</table>
```
We should initially size the columns according to the cells in the first
row since they have a span of 1. Then we handle the cell in the second
row with a span of 2, this should be able to increase the size of the
columns, but never decrease them.
This commit is contained in:
Oriol Brufau 2024-06-07 18:37:12 +02:00 committed by GitHub
parent 674edb4df0
commit d10d01757d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 2 additions and 45 deletions

View file

@ -433,8 +433,8 @@ impl<'a> TableLayout<'a> {
for column_index in 0..self.table.size.width {
let old_column_measure = &old_column_measures[column_index];
let mut new_column_content_sizes = ContentSizes::zero();
let mut new_column_intrinsic_percentage_width = Percentage(0.);
let mut new_column_content_sizes = old_column_measure.content_sizes;
let mut new_column_intrinsic_percentage_width = old_column_measure.percentage;
for row_index in 0..self.table.size.height {
let coords = TableSlotCoordinates::new(column_index, row_index);