Files
servo/components/layout/flexbox
Oriol Brufau 41a50106eb layout: Stretch replaced elements with aspect ratio but no natural sizes (#42666)
Instead of using the default object width of 300px, use the inline-axis
stretch size, or zero when computing the intrinsic contribution.

Note browsers don't completely agree in the details of how to do this.
This implements a behavior very similar to Blink, but without having
different behaviors for min/max-content depending on which property they
are used (which doesn't make much sense to me).

The biggest part of the patch is for block-level boxes that establish an
independent formatting context and need to avoid overlapping floats. In
that case we may need to try laying out multiple times, varying the
stretch size. Previously the code assumed that this wouldn't affect the
intrinsic inline sizes, but now we have this dependency, so the logic
had to be refactored.

Testing: Some tests pass. One test results in an error, but that happens
in all browsers.
Fixes: #38653

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
2026-03-23 19:30:53 +00:00
..