servo/components/layout_2020/flow/inline
Oriol Brufau c7502a99f0
layout: Floor the max-content size by the min-content size (#36518)
It's typically a given that the min-content size can't exceed the
max-content size. However, it was possible to break that assumption when
an inline formatting context had contents with a negative outer size
(due to margins). This could lead to assert failures.

This patch avoids the problem by flooring the max-content size to not be
smaller than the min-content size. Note there is no interoperability:
https://github.com/w3c/csswg-drafts/issues/12076

Testing: adding new reftest and crashtest
Fixes: #36481

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2025-04-14 18:00:32 +00:00
..
construct.rs layout: Add a LayoutBoxBase to inline boxes (#36513) 2025-04-14 16:02:37 +00:00
inline_box.rs layout: Add a LayoutBoxBase to inline boxes (#36513) 2025-04-14 16:02:37 +00:00
line.rs layout: Add a LayoutBoxBase to inline boxes (#36513) 2025-04-14 16:02:37 +00:00
line_breaker.rs layout: Linebreak the entire InlineFormattingContext at once (#32483) 2024-06-13 20:12:14 +00:00
mod.rs layout: Floor the max-content size by the min-content size (#36518) 2025-04-14 18:00:32 +00:00
text_run.rs fix: Crashing due to input element hack (#36461) 2025-04-11 06:51:52 +00:00