mirror of
https://github.com/servo/servo
synced 2026-05-13 02:17:06 +02:00
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>