mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
layout: Fix intrinsic contributions of tables (#34696)
If a table element had e.g. `width: 0px`, we were assuming that this was its intrinsic min-content and max-content contributions. However, tables are always at least as big as its min-content size, so this patch floors the intrinsic contributions by that amount. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
915901bdec
commit
65c65c9a6a
7 changed files with 24 additions and 12 deletions
|
@ -204,11 +204,18 @@ impl IndependentFormattingContext {
|
|||
auto_minimum: &LogicalVec2<Au>,
|
||||
auto_block_size_stretches_to_containing_block: bool,
|
||||
) -> InlineContentSizesResult {
|
||||
let is_table = matches!(
|
||||
self.contents,
|
||||
IndependentFormattingContextContents::NonReplaced(
|
||||
IndependentNonReplacedContents::Table(_)
|
||||
)
|
||||
);
|
||||
sizing::outer_inline(
|
||||
self.style(),
|
||||
containing_block,
|
||||
auto_minimum,
|
||||
auto_block_size_stretches_to_containing_block,
|
||||
is_table,
|
||||
|padding_border_sums| self.preferred_aspect_ratio(padding_border_sums),
|
||||
|constraint_space| self.inline_content_sizes(layout_context, constraint_space),
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue