style: Use a SharedFontList object to store font-family values for Gecko.

This commit is contained in:
Cameron McCormack 2017-09-29 17:43:22 +08:00
parent c0f404999c
commit 4d9dd4b757
6 changed files with 242 additions and 89 deletions

View file

@ -135,7 +135,7 @@ impl FontContext {
let mut fonts: SmallVec<[Rc<RefCell<Font>>; 8]> = SmallVec::new();
for family in &style.font_family.0 {
for family in style.font_family.0.iter() {
// GWTODO: Check on real pages if this is faster as Vec() or HashMap().
let mut cache_hit = false;
for cached_font_entry in &self.layout_font_cache {