layout: Generalize ContainingBlock's block size to a SizeConstraint (#34946)

It used to be an `AuOrAuto`, turning it into a `SizeConstraint` allows
passing the information about the min and max constraints when the
containing block doesn't have a definite block size.

This will be useful for table layout.

Note that in most cases we were already constructing the containing
block from a `SizeConstraint`, but we were calling `to_auto_or()` to
turn it into an `AuOrAuto`.

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-01-13 02:25:33 -08:00 committed by GitHub
parent de780dcde4
commit f66cd172d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 71 additions and 69 deletions

View file

@ -514,7 +514,7 @@ impl ReplacedContents {
let block_stretch_size = containing_block
.size
.block
.non_auto()
.to_definite()
.map(|block_size| Au::zero().max(block_size - pbm_sums.block));
// First, compute the inline size. Intrinsic values depend on the block sizing properties