diff options
author | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 19:50:29 +0000 |
---|---|---|
committer | akalin@chromium.org <akalin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-30 19:50:29 +0000 |
commit | c4f7dfb44992c8fb9139133107e0ac9200edf241 (patch) | |
tree | e6ca6cdc567628d3481d96d56e24d58359148631 /app/gfx | |
parent | 25e979d39063ea83e0635010a3204aa6ec0b166b (diff) | |
download | chromium_src-c4f7dfb44992c8fb9139133107e0ac9200edf241.zip chromium_src-c4f7dfb44992c8fb9139133107e0ac9200edf241.tar.gz chromium_src-c4f7dfb44992c8fb9139133107e0ac9200edf241.tar.bz2 |
Implemented most of HtmlDialogWindowController, which is a Cocoa port
of HtmlDialogView.
Added TODO to fix inaccurate font height metric for OS X font class (and maybe width).
Added the BrowserCommandExecutor protocol so that not just a
BrowserWindowController can be the window controller for a
ChromeEventProcessingWindow.
Added unittests. Also tested manually with the bookmark sync setup
wizard dialog.
BUG=23073
TEST=added unittests, trybot, and manual testing
Review URL: http://codereview.chromium.org/344008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30619 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app/gfx')
-rw-r--r-- | app/gfx/font_mac.mm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/gfx/font_mac.mm b/app/gfx/font_mac.mm index b39ebea..4d0a48e 100644 --- a/app/gfx/font_mac.mm +++ b/app/gfx/font_mac.mm @@ -33,6 +33,9 @@ Font::Font() void Font::calculateMetrics() { NSFont* font = nativeFont(); + // TODO(akalin): This is the wrong height to use! Use either the height + // of the bounding rect for the font or ascender - descender; this needs + // further investigation. Width may be wrong, too. height_ = [font xHeight]; ascent_ = [font ascender]; avg_width_ = [font boundingRectForGlyph:[font glyphWithName:@"x"]].size.width; |