From 447cc64a40d33ee1cb9d3d3410cb082c5ed21f75 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 3 Jan 2014 14:54:33 +0000 Subject: [PATCH] Remove some trailing whitespace --- src/components/gfx/font.rs | 8 ++++---- src/components/gfx/font_context.rs | 10 +++++----- src/components/gfx/font_list.rs | 4 ++-- src/components/style/properties.rs.mako | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/gfx/font.rs b/src/components/gfx/font.rs index 8096b9cb622..ac2d45b6f2b 100644 --- a/src/components/gfx/font.rs +++ b/src/components/gfx/font.rs @@ -198,7 +198,7 @@ impl RunMetrics { // ascent+descent and advance is sometimes too generous and // looking at actual glyph extents can yield a tighter box. - RunMetrics { + RunMetrics { advance_width: advance, bounding_box: bounds, ascent: ascent, @@ -287,9 +287,9 @@ impl<'self> Font { fn make_shaper(&'self mut self) -> &'self Shaper { // fast path: already created a shaper match self.shaper { - Some(ref shaper) => { + Some(ref shaper) => { let s: &'self Shaper = shaper; - return s; + return s; }, None => {} } @@ -400,7 +400,7 @@ impl Font { let glyphbuf = struct__AzGlyphBuffer { mGlyphs: vec::raw::to_ptr(azglyphs), - mNumGlyphs: azglyph_buf_len as uint32_t + mNumGlyphs: azglyph_buf_len as uint32_t }; unsafe { diff --git a/src/components/gfx/font_context.rs b/src/components/gfx/font_context.rs index 5493cf7c9b4..2ed981994da 100644 --- a/src/components/gfx/font_context.rs +++ b/src/components/gfx/font_context.rs @@ -38,7 +38,7 @@ impl<'self> FontContext { profiler_chan: ProfilerChan) -> FontContext { let handle = FontContextHandle::new(); - let font_list = if needs_font_list { + let font_list = if needs_font_list { Some(FontList::new(&handle, profiler_chan.clone())) } else { None }; @@ -50,7 +50,7 @@ impl<'self> FontContext { generic_fonts.insert(~"fantasy", ~"Papyrus"); generic_fonts.insert(~"monospace", ~"Menlo"); - FontContext { + FontContext { instance_cache: LRUCache::new(10), font_list: font_list, group_cache: LRUCache::new(10), @@ -86,7 +86,7 @@ impl<'self> FontContext { debug!("font cache hit"); Ok(f) }, - None => { + None => { debug!("font cache miss"); let result = self.create_font_instance(desc); match result.clone() { @@ -142,7 +142,7 @@ impl<'self> FontContext { let instance = self.get_font_by_descriptor(result); for font in instance.iter() { fonts.push(font.clone()); } - }, + }, _ => {} } @@ -200,7 +200,7 @@ impl<'self> FontContext { fn create_font_instance(&self, desc: &FontDescriptor) -> Result, ()> { return match &desc.selector { // TODO(Issue #174): implement by-platform-name font selectors. - &SelectorPlatformIdentifier(ref identifier) => { + &SelectorPlatformIdentifier(ref identifier) => { let result_handle = self.handle.create_font_from_identifier((*identifier).clone(), desc.style.clone()); do result_handle.and_then |handle| { diff --git a/src/components/gfx/font_list.rs b/src/components/gfx/font_list.rs index 543610bb517..f4aba05c140 100644 --- a/src/components/gfx/font_list.rs +++ b/src/components/gfx/font_list.rs @@ -54,7 +54,7 @@ impl<'self> FontList { } pub fn find_font_in_family(&'self mut self, - family_name: &~str, + family_name: &~str, style: &SpecifiedFontStyle) -> Option<&'self FontEntry> { // TODO(Issue #188): look up localized font family names if canonical name not found // look up canonical name @@ -82,7 +82,7 @@ impl<'self> FontList { } } -// Holds a specific font family, and the various +// Holds a specific font family, and the various pub struct FontFamily<'self> { family_name: ~str, entries: ~[FontEntry], diff --git a/src/components/style/properties.rs.mako b/src/components/style/properties.rs.mako index 01cbca38295..95611a38b6d 100644 --- a/src/components/style/properties.rs.mako +++ b/src/components/style/properties.rs.mako @@ -191,7 +191,7 @@ pub mod longhands { match component_value { &Ident(ref value) => { // FIXME: Workaround for https://github.com/mozilla/rust/issues/10683 - let value_lower = value.to_ascii_lower(); + let value_lower = value.to_ascii_lower(); match value_lower.as_slice() { "thin" => Some(specified::Length::from_px(1.)), "medium" => Some(specified::Length::from_px(3.)), @@ -236,7 +236,7 @@ pub mod longhands { // TODO: don't parse values we don't support <%self:single_keyword_computed name="display" - values="inline block inline-block + values="inline block inline-block table inline-table table-row-group table-header-group table-footer-group table-row table-column-group table-column table-cell table-caption list-item @@ -346,7 +346,7 @@ pub mod longhands { match input { &Ident(ref value) => { // FIXME: Workaround for https://github.com/mozilla/rust/issues/10683 - let value_lower = value.to_ascii_lower(); + let value_lower = value.to_ascii_lower(); match value_lower.as_slice() { % for keyword in vertical_align_keywords: "${keyword}" => Some(Specified_${to_rust_ident(keyword)}), @@ -472,7 +472,7 @@ pub mod longhands { Some(&Ident(ref value)) => { // FIXME: Workaround for https://github.com/mozilla/rust/issues/10683 let value = value.as_slice(); - let value_lower = value.to_ascii_lower(); + let value_lower = value.to_ascii_lower(); match value_lower.as_slice() { // "serif" => add!(Serif), // "sans-serif" => add!(SansSerif), @@ -523,7 +523,7 @@ pub mod longhands { match input { &Ident(ref value) => { // FIXME: Workaround for https://github.com/mozilla/rust/issues/10683 - let value_lower = value.to_ascii_lower(); + let value_lower = value.to_ascii_lower(); match value_lower.as_slice() { "bold" => Some(SpecifiedWeight700), "normal" => Some(SpecifiedWeight400),