mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
layout: Remove FontStyle
in favor of using the font style struct
directly, and optimize `get_layout_font_group()` to use a small vector. Seems to be a 38% layout win on a site I tested with a lot of text.
This commit is contained in:
parent
f3066c70da
commit
a6fcec468f
6 changed files with 52 additions and 87 deletions
|
@ -774,6 +774,13 @@ pub mod longhands {
|
|||
// Fantasy,
|
||||
// Monospace,
|
||||
}
|
||||
impl FontFamily {
|
||||
pub fn name(&self) -> &str {
|
||||
match *self {
|
||||
FamilyName(ref name) => name.as_slice(),
|
||||
}
|
||||
}
|
||||
}
|
||||
pub type T = Vec<FontFamily>;
|
||||
}
|
||||
pub type SpecifiedValue = computed_value::T;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue