mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
layout: Make a new ContainingBlockSize
type (#34565)
This might make caching these values a bit easier in the future. Correcting the visibility of `ContainingBlock` also exposed some new rustc and clippy warnings that are fixed here. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
064569ff3c
commit
f1b8d49e77
13 changed files with 192 additions and 158 deletions
|
@ -521,9 +521,10 @@ impl ReplacedContents {
|
|||
};
|
||||
|
||||
// <https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing>
|
||||
let inline_stretch_size = Au::zero().max(containing_block.inline_size - pbm_sums.inline);
|
||||
let inline_stretch_size = Au::zero().max(containing_block.size.inline - pbm_sums.inline);
|
||||
let block_stretch_size = containing_block
|
||||
.block_size
|
||||
.size
|
||||
.block
|
||||
.non_auto()
|
||||
.map(|block_size| Au::zero().max(block_size - pbm_sums.block));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue