Remove unnecessary ServoFont type alias

This commit is contained in:
Matt Brubeck 2016-05-13 16:20:59 -07:00
parent 45dc587d42
commit 4361f92067
2 changed files with 4 additions and 8 deletions

View file

@ -16,7 +16,6 @@ use std::str;
use std::sync::Arc; use std::sync::Arc;
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering}; use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
use style::computed_values::{font_stretch, font_variant, font_weight}; use style::computed_values::{font_stretch, font_variant, font_weight};
use style::properties::style_structs::ServoFont;
use text::Shaper; use text::Shaper;
use text::glyph::{GlyphId, GlyphStore}; use text::glyph::{GlyphId, GlyphStore};
use text::shaping::ShaperMethods; use text::shaping::ShaperMethods;
@ -88,8 +87,6 @@ pub struct FontMetrics {
pub line_gap: Au, pub line_gap: Au,
} }
pub type SpecifiedFontStyle = ServoFont;
#[derive(Debug)] #[derive(Debug)]
pub struct Font { pub struct Font {
pub handle: FontHandle, pub handle: FontHandle,

View file

@ -8,9 +8,7 @@ use azure::azure_hl::BackendType;
use azure::scaled_font::FontInfo; use azure::scaled_font::FontInfo;
use azure::scaled_font::ScaledFont; use azure::scaled_font::ScaledFont;
use fnv::FnvHasher; use fnv::FnvHasher;
use font::FontHandleMethods; use font::{Font, FontGroup, FontHandleMethods};
use font::SpecifiedFontStyle;
use font::{Font, FontGroup};
use font_cache_thread::FontCacheThread; use font_cache_thread::FontCacheThread;
use font_template::FontTemplateDescriptor; use font_template::FontTemplateDescriptor;
use heapsize::HeapSizeOf; use heapsize::HeapSizeOf;
@ -27,6 +25,7 @@ use std::sync::Arc;
use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT};
use string_cache::Atom; use string_cache::Atom;
use style::computed_values::{font_style, font_variant}; use style::computed_values::{font_style, font_variant};
use style::properties::style_structs::ServoFont;
use util::cache::HashCache; use util::cache::HashCache;
use webrender_traits; use webrender_traits;
@ -158,7 +157,7 @@ impl FontContext {
/// Create a group of fonts for use in layout calculations. May return /// Create a group of fonts for use in layout calculations. May return
/// a cached font if this font instance has already been used by /// a cached font if this font instance has already been used by
/// this context. /// this context.
pub fn layout_font_group_for_style(&mut self, style: Arc<SpecifiedFontStyle>) pub fn layout_font_group_for_style(&mut self, style: Arc<ServoFont>)
-> Rc<FontGroup> { -> Rc<FontGroup> {
self.expire_font_caches_if_necessary(); self.expire_font_caches_if_necessary();
@ -317,7 +316,7 @@ impl HeapSizeOf for FontContext {
#[derive(Debug)] #[derive(Debug)]
struct LayoutFontGroupCacheKey { struct LayoutFontGroupCacheKey {
pointer: Arc<SpecifiedFontStyle>, pointer: Arc<ServoFont>,
size: Au, size: Au,
} }