mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
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:
parent
4cd8813a81
commit
a541046147
13 changed files with 62 additions and 89 deletions
|
@ -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(()),
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue