diff options
author | Matt Brubeck <mbrubeck@limpet.net> | 2016-05-13 16:20:59 -0700 |
---|---|---|
committer | Matt Brubeck <mbrubeck@limpet.net> | 2016-05-13 16:20:59 -0700 |
commit | 4361f92067d7c77ff09c391dc7ad68f0e6e09b8c (patch) | |
tree | e732d12350e31ca9a4269f7fd2903d361f48f47e | |
parent | 45dc587d42be1528de54db51b36af273bc90cfbd (diff) | |
download | servo-4361f92067d7c77ff09c391dc7ad68f0e6e09b8c.tar.gz servo-4361f92067d7c77ff09c391dc7ad68f0e6e09b8c.zip |
Remove unnecessary ServoFont type alias
-rw-r--r-- | components/gfx/font.rs | 3 | ||||
-rw-r--r-- | components/gfx/font_context.rs | 9 |
2 files changed, 4 insertions, 8 deletions
diff --git a/components/gfx/font.rs b/components/gfx/font.rs index 926b824271f..1abfe692cc0 100644 --- a/components/gfx/font.rs +++ b/components/gfx/font.rs @@ -16,7 +16,6 @@ use std::str; use std::sync::Arc; use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering}; use style::computed_values::{font_stretch, font_variant, font_weight}; -use style::properties::style_structs::ServoFont; use text::Shaper; use text::glyph::{GlyphId, GlyphStore}; use text::shaping::ShaperMethods; @@ -88,8 +87,6 @@ pub struct FontMetrics { pub line_gap: Au, } -pub type SpecifiedFontStyle = ServoFont; - #[derive(Debug)] pub struct Font { pub handle: FontHandle, diff --git a/components/gfx/font_context.rs b/components/gfx/font_context.rs index ff7715e2cb7..184b0924961 100644 --- a/components/gfx/font_context.rs +++ b/components/gfx/font_context.rs @@ -8,9 +8,7 @@ use azure::azure_hl::BackendType; use azure::scaled_font::FontInfo; use azure::scaled_font::ScaledFont; use fnv::FnvHasher; -use font::FontHandleMethods; -use font::SpecifiedFontStyle; -use font::{Font, FontGroup}; +use font::{Font, FontGroup, FontHandleMethods}; use font_cache_thread::FontCacheThread; use font_template::FontTemplateDescriptor; use heapsize::HeapSizeOf; @@ -27,6 +25,7 @@ use std::sync::Arc; use std::sync::atomic::{AtomicUsize, Ordering, ATOMIC_USIZE_INIT}; use string_cache::Atom; use style::computed_values::{font_style, font_variant}; +use style::properties::style_structs::ServoFont; use util::cache::HashCache; use webrender_traits; @@ -158,7 +157,7 @@ impl FontContext { /// Create a group of fonts for use in layout calculations. May return /// a cached font if this font instance has already been used by /// 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> { self.expire_font_caches_if_necessary(); @@ -317,7 +316,7 @@ impl HeapSizeOf for FontContext { #[derive(Debug)] struct LayoutFontGroupCacheKey { - pointer: Arc<SpecifiedFontStyle>, + pointer: Arc<ServoFont>, size: Au, } |