Include border-spacing gutters in compute_inline_content_sizes (#31337)

This way, if the table is inside an intrinsically sized container, like
a float or inline-block, the table won't overflow it (in basic cases).
This commit is contained in:
Oriol Brufau 2024-02-13 01:00:02 -08:00 committed by GitHub
parent d78ebfb20c
commit 07c7096246
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 12 deletions

View file

@ -1185,6 +1185,9 @@ impl Table {
inline_content_sizes.push(row_inline_content_sizes);
total_size += max_content_sizes_in_column;
}
let gutters = self.border_spacing().inline * (self.size.width as i32 + 1);
total_size.min_content += gutters;
total_size.max_content += gutters;
(total_size, inline_content_sizes)
}

View file

@ -4,9 +4,3 @@
[.table 2]
expected: FAIL
[.table 3]
expected: FAIL
[.table 4]
expected: FAIL

View file

@ -2,12 +2,6 @@
[table 2]
expected: FAIL
[table 3]
expected: FAIL
[table 4]
expected: FAIL
[table 5]
expected: FAIL