mirror of
https://github.com/servo/servo.git
synced 2025-07-22 06:43:40 +01:00
TableWrapper: fix content inline size calculation
The preferred size of all columns was always being used before, but this caused problems when it does not fit along with margins.
This commit is contained in:
parent
f6163c77b9
commit
d7a9c3f8e5
4 changed files with 91 additions and 1 deletions
|
@ -778,7 +778,13 @@ fn initial_computed_inline_size(block: &mut BlockFlow,
|
|||
containing_block_inline_size);
|
||||
match inline_size_from_style {
|
||||
MaybeAuto::Auto => {
|
||||
MaybeAuto::Specified(min(containing_block_inline_size, preferred_width_of_all_columns))
|
||||
if preferred_width_of_all_columns + table_border_padding <= containing_block_inline_size {
|
||||
MaybeAuto::Specified(preferred_width_of_all_columns + table_border_padding)
|
||||
} else if minimum_width_of_all_columns > containing_block_inline_size {
|
||||
MaybeAuto::Specified(minimum_width_of_all_columns)
|
||||
} else {
|
||||
MaybeAuto::Auto
|
||||
}
|
||||
}
|
||||
MaybeAuto::Specified(inline_size_from_style) => {
|
||||
MaybeAuto::Specified(max(inline_size_from_style - table_border_padding,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue