layout: Floor content-box size by zero when stretching flex item (#38521)

When stretching the cross size of a flex item to its flex line, we were
computing the stretch size by subtracting padding, border and margin
from the line size. However, this could result in a negative amount for
the content-box cross size. Therefore, this floors it by zero.

Testing: Adding new tests
Fixes: #38517

Signed-off-by: Oriol Brufau <obrufau@igalia.com>
This commit is contained in:
Oriol Brufau 2025-08-07 11:19:22 -07:00 committed by GitHub
parent cf99d437fb
commit 87538282db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 99 additions and 1 deletions

View file

@ -255316,6 +255316,32 @@
{}
]
],
"flexbox-stretch-minimum-001.html": [
"499a9076f3d18c693db904cee001f9896c052b45",
[
null,
[
[
"/css/reference/ref-filled-green-200px-square.html",
"=="
]
],
{}
]
],
"flexbox-stretch-minimum-002.html": [
"cfb1cd13b424d5ec1ffd5665f576eb4711bda9b9",
[
null,
[
[
"/css/reference/ref-filled-green-200px-square.html",
"=="
]
],
{}
]
],
"min-width-1.html": [
"a1a39073e88d4626be7c469611e3593415849e7a",
[