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:
Patrick Walton 2014-10-15 22:09:15 -07:00
parent f3066c70da
commit a6fcec468f
6 changed files with 52 additions and 87 deletions

View file

@ -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;