style: Use mozilla::Length rather than nscoord to store font sizes.

This avoids arbitrary precision loss when computing REM units and so on,
which is particularly important if we ever change the base of our app
units (but useful regardless).

Differential Revision: https://phabricator.services.mozilla.com/D79928
This commit is contained in:
Emilio Cobos Álvarez 2020-06-22 09:45:40 +00:00
parent 45f5d84d1b
commit 46df06b3e2
12 changed files with 99 additions and 100 deletions

View file

@ -232,7 +232,7 @@ impl<'a> Context<'a> {
// -x-text-zoom property, which leads to a false value
// in mAllowZoomAndMinSize
if self.style().get_font().gecko.mAllowZoomAndMinSize {
self.device().zoom_text(Au::from(size)).into()
self.device().zoom_text(size)
} else {
size
}