Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm

Issue 3083022: Rework gfx::Font by moving platform-specific code into inner classes.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/autocomplete_popup_view_mac.mm
===================================================================
--- chrome/browser/autocomplete/autocomplete_popup_view_mac.mm (revision 55911)
+++ chrome/browser/autocomplete/autocomplete_popup_view_mac.mm (working copy)
@@ -103,7 +103,7 @@
// Start out with a string using the default style info.
NSString* s = base::SysWideToNSString(matchString);
NSDictionary* attributes = [NSDictionary dictionaryWithObjectsAndKeys:
- font.nativeFont(), NSFontAttributeName,
+ font.GetNativeFont(), NSFontAttributeName,
textColor, NSForegroundColorAttributeName,
nil];
NSMutableAttributedString* as =
@@ -128,7 +128,7 @@
if (0 != (i->style & ACMatchClassification::MATCH)) {
if (!boldFont) {
NSFontManager* fontManager = [NSFontManager sharedFontManager];
- boldFont = [fontManager convertFont:font.nativeFont()
+ boldFont = [fontManager convertFont:font.GetNativeFont()
toHaveTrait:NSBoldFontMask];
}
[as addAttribute:NSFontAttributeName value:boldFont range:range];
@@ -197,7 +197,7 @@
NSDictionary* attributes =
[NSDictionary dictionaryWithObjectsAndKeys:
- font.nativeFont(), NSFontAttributeName,
+ font.GetNativeFont(), NSFontAttributeName,
ContentTextColor(), NSForegroundColorAttributeName,
nil];
NSString* rawEnDash = [NSString stringWithFormat:@" %C ", 0x2013];
@@ -405,8 +405,8 @@
// The popup's font is a slightly smaller version of the field's.
NSFont* fieldFont = AutocompleteEditViewMac::GetFieldFont();
const CGFloat resultFontSize = [fieldFont pointSize] + kEditFontAdjust;
- gfx::Font resultFont = gfx::Font::CreateFont(
- base::SysNSStringToWide([fieldFont fontName]), (int)resultFontSize);
+ gfx::Font resultFont(base::SysNSStringToWide([fieldFont fontName]),
+ static_cast<int>(resultFontSize));
AutocompleteMatrix* matrix = [popup_ contentView];

Powered by Google App Engine
This is Rietveld 408576698