mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
layout: Allow lazy resolution of automatic minimum sizes (#35965)
`Size::resolve_for_min()` had an `Au` parameter, representing the value to be used for an automatic minimum size. However, this amount isn't trivial to compute in flexbox, so this patch changes the parameter to a function that can be called lazily. Note flexbox isn't currently using `Size::resolve_for_min()`, but it will in #35961. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
62d6759106
commit
7cf2fc88a0
5 changed files with 20 additions and 20 deletions
|
@ -538,7 +538,7 @@ impl ReplacedContents {
|
|||
let inline_size = sizes.inline.resolve(
|
||||
Direction::Inline,
|
||||
automatic_size.inline,
|
||||
Au::zero(),
|
||||
Au::zero,
|
||||
Some(inline_stretch_size),
|
||||
get_inline_content_size,
|
||||
false, /* is_table */
|
||||
|
@ -558,7 +558,7 @@ impl ReplacedContents {
|
|||
let block_size = sizes.block.resolve(
|
||||
Direction::Block,
|
||||
automatic_size.block,
|
||||
Au::zero(),
|
||||
Au::zero,
|
||||
block_stretch_size,
|
||||
|| *block_content_size,
|
||||
false, /* is_table */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue