summaryrefslogtreecommitdiffstats
path: root/chrome/common/gfx
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 12:46:38 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-05 12:46:38 +0000
commitf0a51fb571f46531025fa09240bbc3e1af925e84 (patch)
tree558b4f0e737fda4b9ab60f252c9c23b8a4ca523e /chrome/common/gfx
parent6390be368205705f49ead3cec40396519f13b889 (diff)
downloadchromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.zip
chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.gz
chromium_src-f0a51fb571f46531025fa09240bbc3e1af925e84.tar.bz2
Fixes CRLF and trailing white spaces.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10982 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/gfx')
-rw-r--r--chrome/common/gfx/chrome_font.h2
-rw-r--r--chrome/common/gfx/chrome_font_mac.mm10
-rw-r--r--chrome/common/gfx/text_elider.cc4
3 files changed, 8 insertions, 8 deletions
diff --git a/chrome/common/gfx/chrome_font.h b/chrome/common/gfx/chrome_font.h
index 8ac225c..7c25a9b 100644
--- a/chrome/common/gfx/chrome_font.h
+++ b/chrome/common/gfx/chrome_font.h
@@ -215,7 +215,7 @@ class ChromeFont {
int avg_width_;
#elif defined(OS_MACOSX)
explicit ChromeFont(const std::wstring& font_name, int font_size, int style);
-
+
// Calculate and cache the font metrics.
void calculateMetrics();
diff --git a/chrome/common/gfx/chrome_font_mac.mm b/chrome/common/gfx/chrome_font_mac.mm
index a553be6..590c54e 100644
--- a/chrome/common/gfx/chrome_font_mac.mm
+++ b/chrome/common/gfx/chrome_font_mac.mm
@@ -9,8 +9,8 @@
#include "base/logging.h"
#include "base/sys_string_conversions.h"
-// static
-ChromeFont ChromeFont::CreateFont(const std::wstring& font_name,
+// static
+ChromeFont ChromeFont::CreateFont(const std::wstring& font_name,
int font_size) {
return ChromeFont(font_name, font_size, NORMAL);
}
@@ -22,7 +22,7 @@ ChromeFont::ChromeFont(const std::wstring& font_name, int font_size, int style)
calculateMetrics();
}
-ChromeFont::ChromeFont()
+ChromeFont::ChromeFont()
: font_size_([NSFont systemFontSize]),
style_(NORMAL) {
NSFont* system_font = [NSFont systemFontOfSize:font_size_];
@@ -56,7 +56,7 @@ int ChromeFont::ave_char_width() const {
int ChromeFont::GetStringWidth(const std::wstring& text) const {
NSFont* font = nativeFont();
NSString* ns_string = base::SysWideToNSString(text);
- NSDictionary* attributes =
+ NSDictionary* attributes =
[NSDictionary dictionaryWithObject:font forKey:NSFontAttributeName];
NSSize string_size = [ns_string sizeWithAttributes:attributes];
return string_size.width;
@@ -82,6 +82,6 @@ NativeFont ChromeFont::nativeFont() const {
// TODO(pinkerton): apply |style_| to font.
// We could cache this, but then we'd have to conditionally change the
// dtor just for MacOS. Not sure if we want to/need to do that.
- return [NSFont fontWithName:base::SysWideToNSString(font_name_)
+ return [NSFont fontWithName:base::SysWideToNSString(font_name_)
size:font_size_];
}
diff --git a/chrome/common/gfx/text_elider.cc b/chrome/common/gfx/text_elider.cc
index f7405a2..f4a6d4e 100644
--- a/chrome/common/gfx/text_elider.cc
+++ b/chrome/common/gfx/text_elider.cc
@@ -168,9 +168,9 @@ std::wstring ElideUrl(const GURL& url,
}
const int kMaxNumberOfUrlPathElementsAllowed = 1024;
- if (url_path_number_of_elements <= 1 ||
+ if (url_path_number_of_elements <= 1 ||
url_path_number_of_elements > kMaxNumberOfUrlPathElementsAllowed) {
- // No path to elide, or too long of a path (could overflow in loop below)
+ // No path to elide, or too long of a path (could overflow in loop below)
// Just elide this as a text string.
return ElideText(url_subdomain + url_domain + url_path_query_etc, font,
available_pixel_width);