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

@ -156,7 +156,7 @@ impl FontSize {
/// Get default value of font size.
pub fn medium() -> Self {
Self {
size: NonNegative(Length::new(specified::FONT_MEDIUM_PX as CSSFloat)),
size: NonNegative(Length::new(specified::FONT_MEDIUM_PX)),
keyword_info: KeywordInfo::medium(),
}
}