mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
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:
parent
de780dcde4
commit
f66cd172d6
11 changed files with 71 additions and 69 deletions
|
@ -463,7 +463,10 @@ impl ComputedValuesExt for ComputedValues {
|
|||
.min_box_size(containing_block.style.writing_mode)
|
||||
.map_inline_and_block_sizes(
|
||||
|lp| lp.to_used_value(containing_block.size.inline),
|
||||
|lp| lp.to_used_value(containing_block.size.block.auto_is(Au::zero)),
|
||||
|lp| {
|
||||
let cbbs = containing_block.size.block.to_definite();
|
||||
lp.to_used_value(cbbs.unwrap_or_else(Au::zero))
|
||||
},
|
||||
);
|
||||
self.content_min_box_size_for_min_size(min_size, pbm)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue