gecko-dev/servo
Emilio Cobos Álvarez 71aa26835f Bug 1881220 - Change calc() resolution mode to always round than truncate-by-default. r=firefox-style-system-reviewers,boris
The regressing bug regressed some calc() expressions like the one in the
test-case:

  max-width: calc(100% - <some-fixed-length>);

Where floating point precision basically made us lose a little bit of
precision here and there.

Before bug 1841612, this worked because we'd operate in fixed point for
such simple expressions at least. Things could easily go equally south
for more complex things including e.g. rem().

Rounding seems like the better default for calc() since we basically
have no idea of what the output is going to be, and makes the answer
more likely to be precise.

Note that this only affects actual mixed calc() expressions: If things
resolve to a percentage we keep existing behavior.

Differential Revision: https://phabricator.services.mozilla.com/D202746
2024-02-27 11:06:52 +00:00
..
components Bug 1560702 - Improve hit boxes of titlebar buttons. r=stransky,desktop-theme-reviewers,dao 2024-02-27 10:28:56 +00:00
ports/geckolib Bug 1881220 - Change calc() resolution mode to always round than truncate-by-default. r=firefox-style-system-reviewers,boris 2024-02-27 11:06:52 +00:00
tests/unit Bug 1865563 - Rustfmt servo/. r=firefox-style-system-reviewers,emilio 2023-11-20 15:17:57 +00:00
moz.build
rustfmt.toml