Bug 1875578 [wpt PR 44105] - [grid] Downgrade flex fraction logic to floats (instead...
commit10ff33aa98a054cb7f1e811938ccf0bd04fbde80
authorIan Kilpatrick <ikilpatrick@chromium.org>
Sun, 21 Jan 2024 10:10:42 +0000 (21 10:10 +0000)
committermoz-wptsync-bot <wptsync@mozilla.com>
Mon, 22 Jan 2024 09:08:59 +0000 (22 09:08 +0000)
tree7d43382189893ca89bbbfb8f224410ef8fe5e61b
parent5338563d04b38e4d84d2cecc5c839fa88d5139ae
Bug 1875578 [wpt PR 44105] - [grid] Downgrade flex fraction logic to floats (instead of doubles)., a=testonly

Automatic update from web-platform-tests
[grid] Downgrade flex fraction logic to floats (instead of doubles).

Previously we had a separate struct for representing fr-units called
GridLengths. This stored a Length, and then separately a double for
fr units.

In:
https://chromium-review.googlesource.com/c/chromium/src/+/4815886

I merged these two objects, however this left us storing fr's as
floats, but performing operations as doubles. This resulted in sutble
numerical errors when converting between them.

To remove the conversions, use floats within the grid logic instead.

The primary risk of this patch is the loss of precision, however this
seems unlikely in real world usages.

Bug: 1515685
Change-Id: I773f34c32d7bb95561e6f37d780a0016663e074d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5173958
Reviewed-by: Alison Maher <almaher@microsoft.com>
Reviewed-by: Ethan Jimenez <ethavar@microsoft.com>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1249781}

--

wpt-commits: 3c8963da9a0d9befa9d655966ff64de27dfe3afb
wpt-pr: 44105
testing/web-platform/tests/css/css-grid/grid-tracks-fractional-fr.html [new file with mode: 0644]