mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
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:
parent
674edb4df0
commit
d10d01757d
20 changed files with 2 additions and 45 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue