style: Use less Au in font code.

Font code is the only thing that was using Au in the style system without
interfacing with Gecko, and there was no real reason for it to do so.

This slightly simplifies the code.

Differential Revision: https://phabricator.services.mozilla.com/D57248
This commit is contained in:
Emilio Cobos Álvarez 2019-12-15 20:15:29 +01:00
parent 4cd8813a81
commit a541046147
13 changed files with 62 additions and 89 deletions

View file

@ -5,8 +5,7 @@
//! Specified types for legacy Gecko-only properties.
use crate::parser::{Parse, ParserContext};
use crate::values::computed::length::CSSPixelLength;
use crate::values::computed::{self, LengthPercentage};
use crate::values::computed::{self, LengthPercentage, Length};
use crate::values::generics::rect::Rect;
use cssparser::{Parser, Token};
use std::fmt;
@ -24,7 +23,7 @@ fn parse_pixel_or_percent<'i, 't>(
value, ref unit, ..
} => {
match_ignore_ascii_case! { unit,
"px" => Ok(LengthPercentage::new(CSSPixelLength::new(value), None)),
"px" => Ok(LengthPercentage::new(Length::new(value), None)),
_ => Err(()),
}
},