mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
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:
parent
d78ebfb20c
commit
07c7096246
3 changed files with 3 additions and 12 deletions
|
@ -1185,6 +1185,9 @@ impl Table {
|
||||||
inline_content_sizes.push(row_inline_content_sizes);
|
inline_content_sizes.push(row_inline_content_sizes);
|
||||||
total_size += max_content_sizes_in_column;
|
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)
|
(total_size, inline_content_sizes)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,9 +4,3 @@
|
||||||
|
|
||||||
[.table 2]
|
[.table 2]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[.table 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[.table 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
|
@ -2,12 +2,6 @@
|
||||||
[table 2]
|
[table 2]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
[table 3]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[table 4]
|
|
||||||
expected: FAIL
|
|
||||||
|
|
||||||
[table 5]
|
[table 5]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue