mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
layout: Obey intrinsic min/max block sizes on flex containers (#36973)
Intrinsic sizing keywords weren't working correctly on the min and max block sizes of a flex container, because we weren't setting the `CacheableLayoutResult::content_block_size` to the right value. This also ensures that `align-content` aligns within the final size of the container. Note it's not very clear what to do for single-line containers, they are being discussed in https://github.com/w3c/csswg-drafts/issues/12123 Testing: Adding new WPT tests. There are still some failures, but most subtests would fail without this change. Fixes: #36981 Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
103cbed928
commit
cd0dbb9afb
7 changed files with 401 additions and 22 deletions
|
@ -243,7 +243,7 @@ impl IndependentNonReplacedContents {
|
|||
containing_block_for_children: &ContainingBlock,
|
||||
containing_block: &ContainingBlock,
|
||||
depends_on_block_constraints: bool,
|
||||
_lazy_block_size: &LazySize,
|
||||
lazy_block_size: &LazySize,
|
||||
) -> CacheableLayoutResult {
|
||||
match self {
|
||||
IndependentNonReplacedContents::Flow(bfc) => bfc.layout(
|
||||
|
@ -257,6 +257,7 @@ impl IndependentNonReplacedContents {
|
|||
positioning_context,
|
||||
containing_block_for_children,
|
||||
depends_on_block_constraints,
|
||||
lazy_block_size,
|
||||
),
|
||||
IndependentNonReplacedContents::Grid(fc) => fc.layout(
|
||||
layout_context,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue