mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Implement special table sizing for floats (#32150)
Tables should always be at least as big as their min-content size, even if we would expect a smaller size according to CSS sizing properties. #31455 implemented it for in-flow tables participting in flow layout, but a few cases remained. This patch addresses floated tables.
This commit is contained in:
parent
18a4c7503a
commit
a14ee03de3
2 changed files with 18 additions and 6 deletions
|
@ -950,12 +950,26 @@ impl FloatBox {
|
|||
&containing_block_for_children,
|
||||
containing_block,
|
||||
);
|
||||
let (block_size, inline_size) =
|
||||
match independent_layout.content_inline_size_for_table {
|
||||
Some(inline_size) => (
|
||||
independent_layout.content_block_size.into(),
|
||||
inline_size.into(),
|
||||
),
|
||||
None => (
|
||||
box_size.block.auto_is(|| {
|
||||
Length::from(independent_layout.content_block_size)
|
||||
.clamp_between_extremums(
|
||||
min_box_size.block,
|
||||
max_box_size.block,
|
||||
)
|
||||
}),
|
||||
inline_size,
|
||||
),
|
||||
};
|
||||
content_size = LogicalVec2 {
|
||||
inline: inline_size,
|
||||
block: block_size.auto_is(|| {
|
||||
Length::from(independent_layout.content_block_size)
|
||||
.clamp_between_extremums(min_box_size.block, max_box_size.block)
|
||||
}),
|
||||
block: block_size,
|
||||
};
|
||||
children = independent_layout.fragments;
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue