Bug 1883874 [wpt PR 44933] - Treat indefinite percentages in calc-size() calculation...
commit88196d4742fd9b4da80b7d8ca821a614f14925b8
authorL. David Baron <dbaron@chromium.org>
Tue, 12 Mar 2024 22:28:43 +0000 (12 22:28 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Thu, 14 Mar 2024 08:38:20 +0000 (14 08:38 +0000)
tree1b6e82271bd809fae52b112187727b8330fffb1b
parent0032e44c2f46aa4714a8b56c28234b6d4893d56d
Bug 1883874 [wpt PR 44933] - Treat indefinite percentages in calc-size() calculation as 0., a=testonly

Automatic update from web-platform-tests
Treat indefinite percentages in calc-size() calculation as 0.

This makes us correctly treat percentages in a calc-size() calculation
as zero in contexts where percentages are not definite.

Previously the tests I had for this passed because they were resolving
against -1 (kIndefiniteSize) and then the result was being clamped.
This adds a test (the "calc-size(any, 31% + 12px)" case) for a case
where that doesn't work correctly.

Bug: 313072
Change-Id: I37660a4c259cf02233d19659301f337077d30436
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5345509
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Auto-Submit: David Baron <dbaron@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1268559}

--

wpt-commits: 1c839111fa1a7e1a06cbb359e89982f9cea5114b
wpt-pr: 44933
testing/web-platform/tests/css/css-values/calc-size/calc-size-height.tentative.html