mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01: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_for_children,
|
||||||
containing_block,
|
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 {
|
content_size = LogicalVec2 {
|
||||||
inline: inline_size,
|
inline: inline_size,
|
||||||
block: block_size.auto_is(|| {
|
block: block_size,
|
||||||
Length::from(independent_layout.content_block_size)
|
|
||||||
.clamp_between_extremums(min_box_size.block, max_box_size.block)
|
|
||||||
}),
|
|
||||||
};
|
};
|
||||||
children = independent_layout.fragments;
|
children = independent_layout.fragments;
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[floated-table-wider-than-specified.html]
|
|
||||||
expected: FAIL
|
|
Loading…
Add table
Add a link
Reference in a new issue