servo/components
Oriol Brufau 1f13e8b596
layout: Allow collapsing bottom margins with any indefinite block size (#36278)
According to CSS2, the bottom margin of a block container can collapse
with the bottom margin of its last in-flow child if `height` computes to
`auto`.

However, according to CSS Sizing, that was "legacy spec prose" and
should be interpreted as "behaves as `auto`".

Therefore, cyclic percentages and intrinsic keywords like `min-content`
shouldn't prevent margin collapse, because they behave as `auto`.

This change aligns Servo with Gecko and Blink, but diverges from WebKit.

https://www.w3.org/TR/CSS22/box.html#collapsing-margins
https://www.w3.org/TR/css-sizing/#behave-auto

Testing:
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-001.html`
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-002.html`
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-003.html`
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-004.html`
-
`tests/wpt/tests/css/css-sizing/margin-collapse-with-indefinite-block-size-005.html`

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-02 12:10:04 +00:00
..
allocator Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
background_hang_monitor Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
bluetooth Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
canvas canvas: Implement line dash setters and getters (#36257) 2025-04-01 11:22:00 +00:00
compositing libservo: Start moving WindowMethods to WebViewDelegate (#36223) 2025-04-02 11:17:24 +00:00
config libservo: Remove a couple EmbedderMethods (#36276) 2025-04-01 22:59:50 +00:00
constellation libservo: Remove a couple EmbedderMethods (#36276) 2025-04-01 22:59:50 +00:00
deny_public_fields Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
devtools devtools: Fix id collisions by using incrementing counters (#35971) 2025-04-01 09:00:40 +00:00
dom_struct script: Feature-gate all crown support. (#35055) 2025-01-18 21:36:15 +00:00
domobject_derive Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
fonts Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
geometry servoshell: Allow overriding screen resolution with a command-line argument (#34038) 2024-10-30 11:54:13 +00:00
hyper_serde Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
jstraceable_derive Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
layout_2020 layout: Allow collapsing bottom margins with any indefinite block size (#36278) 2025-04-02 12:10:04 +00:00
layout_thread_2020 Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
malloc_size_of Cleanup Stylo dependencies (#36046) 2025-03-19 08:53:26 +00:00
media Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
metrics Made MAX_TASK_NS u128. Also removed a superfluous into(). Both were required to fix #36122 with nightly 1.85.0 (4d91de4e4 2025-02-17). (#36169) 2025-03-27 10:02:53 +00:00
net libservo: Remove a couple EmbedderMethods (#36276) 2025-04-01 22:59:50 +00:00
pixels Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
profile Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00
rand Migrate to the 2024 edition (#35755) 2025-03-13 10:28:11 +00:00
range Add rust-version to all Cargo.toml files (#33483) 2024-09-17 16:39:07 +00:00
script dom: Firing "click" event as synthetic pointer event (#36274) 2025-04-02 11:20:25 +00:00
script_bindings Turn CSSStyleRule into a CSSGroupingRule subclass (#36254) 2025-04-01 19:18:07 +00:00
servo libservo: Start moving WindowMethods to WebViewDelegate (#36223) 2025-04-02 11:17:24 +00:00
shared libservo: Start moving WindowMethods to WebViewDelegate (#36223) 2025-04-02 11:17:24 +00:00
timers Update rustfmt to the 2024 style edition (#35764) 2025-03-03 11:26:53 +00:00
url Eliminate to_shmem dependency from servo_url (#35897) 2025-03-11 00:33:39 +00:00
webdriver_server Create a constellation_traits crate (#36088) 2025-03-22 15:49:08 +00:00
webgpu webgpu: leverage routed_promise in calls returning promises (#35859) 2025-03-23 18:52:46 +00:00
webxr Organize component Cargo.toml dependencies (#36224) 2025-03-30 19:03:54 +00:00