mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
layout: Let stretch
on flex item cross size stretch to the line (#38526)
We were instead stretching to the containing block, which implied that the behaviors of a `stretch` size and `stretch` alignment weren't consistent. As resolved by the CSSWG, the behavior will now be: - If the cross size of the line is known, stretch to the line. - Otherwise, stretch to the containing block. See https://github.com/w3c/csswg-drafts/issues/11784 This aligns us with Blink, which has already shipped this new behavior. Testing: Improves existing WPT and adds a new test. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
parent
9866ca7e59
commit
93c9fc14f1
16 changed files with 164 additions and 180 deletions
|
@ -471,7 +471,9 @@ impl ReplacedContents {
|
|||
collapsible_margins_in_children: CollapsedBlockMargins::zero(),
|
||||
content_block_size,
|
||||
content_inline_size_for_table: None,
|
||||
depends_on_block_constraints: false,
|
||||
// The result doesn't depend on `containing_block_for_children.size.block`,
|
||||
// but it depends on `lazy_block_size`, which is probably tied to that.
|
||||
depends_on_block_constraints: true,
|
||||
fragments: self.make_fragments(layout_context, &base.style, size),
|
||||
specific_layout_info: None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue