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:
Oriol Brufau 2024-12-20 06:04:56 -08:00 committed by GitHub
parent 915901bdec
commit 65c65c9a6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 24 additions and 12 deletions

View file

@ -411,6 +411,7 @@ fn compute_inline_content_sizes_for_block_level_boxes(
containing_block,
&LogicalVec2::zero(),
false, /* auto_block_size_stretches_to_containing_block */
false, /* is_table */
|_| None, /* TODO: support preferred aspect ratios on non-replaced boxes */
|constraint_space| {
base.inline_content_sizes(layout_context, constraint_space, contents)