Files
sousa-gecko/testing/web-platform/tests/css/css-viewport
Jonathan Kew a39bd5a226 Bug 2042294 - Quantize font-size at computed-value time, so that "random" floating-point sizes don't overwhelm our caches. r=perftest-reviewers,firefox-style-system-reviewers,layout-reviewers,dshin,sparky
We do this by reducing precision proportionately to the value, rather than simply
rounding to a certain number of decimals or similar, so that small sizes maintain
finer precision. This is particularly important for cases where content specifies
tiny font-size values with the expectation that a large scale() factor will later
be applied.

A perftest with lots of "random" floating-point font sizes is added, based on the
testcase in the report.

(A few existing tests get minor adjustments to allow for the modified precision.)

Differential Revision: https://phabricator.services.mozilla.com/D306131
2026-06-18 12:59:39 +00:00
..
…