servo/components/layout_2020
Oriol Brufau 9858ec81f9
layout: Fix interaction of margin and stretch size on block-level boxes (#35904)
The CSSWG resolved that `block-size: stretch` on a block-level box
stretches the margin box to fill the parent. However, if the parent
doesn't have padding nor border, and doesn't establish an independent
formatting context, then we assume that the margins will collapse.
Therefore, we treat the margins as zero when resolving the stretch size,
regardless of whether they will actually end up collapsing.

https://github.com/w3c/csswg-drafts/issues/11044#issuecomment-2599101601
https://drafts.csswg.org/css-sizing-4/#stretch-fit-sizing

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-03-11 21:32:28 +00:00
..
display_list Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
flexbox layout: Remove calculate_hypothetical_cross_size() (#35821) 2025-03-10 20:38:44 +00:00
flow layout: Fix interaction of margin and stretch size on block-level boxes (#35904) 2025-03-11 21:32:28 +00:00
fragment_tree Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
table layout: Fix interaction of margin and stretch size on block-level boxes (#35904) 2025-03-11 21:32:28 +00:00
taffy Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
tests Update deprecated use of PanicInfo to PanicHookInfo (#34659) 2024-12-17 03:50:26 +00:00
Cargo.toml layout: Implement a non-recursive version of CSS quotes (#34770) 2025-02-27 16:00:21 +00:00
cell.rs layout: Remove the obsolete layout tracing functionality (#35001) 2025-01-15 13:24:14 +00:00
construct_modern.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
context.rs script: Do not set up an IPC route for every image load (#35041) 2025-01-25 09:39:04 +00:00
dom.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
dom_traversal.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
formatting_contexts.rs layout: Limit content_inline_size_for_table override to collapsed columns (#35209) 2025-02-05 00:35:59 +00:00
geom.rs layout: Fix interaction of margin and stretch size on block-level boxes (#35904) 2025-03-11 21:32:28 +00:00
layout_box_base.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
lib.rs layout: Implement a non-recursive version of CSS quotes (#34770) 2025-02-27 16:00:21 +00:00
lists.rs layout: Add LayoutBoxBase and use it for IndependentFormattingContext (#34507) 2024-12-07 19:12:25 +00:00
positioned.rs layout: Fix interaction of margin and stretch size on block-level boxes (#35904) 2025-03-11 21:32:28 +00:00
query.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
quotes.rs layout: Implement a non-recursive version of CSS quotes (#34770) 2025-02-27 16:00:21 +00:00
replaced.rs layout: Fix interaction of margin and stretch size on block-level boxes (#35904) 2025-03-11 21:32:28 +00:00
sizing.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
style_ext.rs layout: Fix interaction of margin and stretch size on block-level boxes (#35904) 2025-03-11 21:32:28 +00:00
traversal.rs Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00