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

Issue 3083022: Rework gfx::Font by moving platform-specific code into inner classes.... (Closed)

Created:
10 years, 4 months ago by Ben Goodger (Google)
Modified:
9 years, 6 months ago
Reviewers:
brettw, sky
CC:
chromium-reviews, ncarter (slow), Raghu Simha, ben+cc_chromium.org, John Grabowski, Erik does not do reviews, Paul Godavari, idana, pam+watch_chromium.org, davemoore+watch_chromium.org, Paweł Hajdan Jr., brettw-cc_chromium.org, tim (not reviewing), Aaron Boodman
Visibility:
Public.

Description

Rework gfx::Font by moving platform-specific code into inner classes. gfx::Font is a platform-neutral API shim that exists as a wrapper object to allow for the creation and lifetime of gfx::Font objects to remain consistent with past usage. gfx::PlatformFont is an interface implemented by the platform-specific inner classes (gfx::PlatformFontWin,Mac,Gtk). BUG=none TEST=existing unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=56040

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 4

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 10

Patch Set 5 : '' #

Total comments: 1

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1257 lines, -1377 lines) Patch
M app/gfx/font_util.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M app/resource_bundle.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M app/resource_bundle_dummy.cc View 1 2 3 4 5 2 chunks +7 lines, -3 lines 0 comments Download
M app/text_elider_unittest.cc View 4 5 1 chunk +1 line, -0 lines 0 comments Download
M app/win_util.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_mac.mm View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/autocomplete/autocomplete_edit_view_win.cc View 1 2 3 4 5 6 chunks +8 lines, -8 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_view_gtk.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_view_mac.mm View 1 2 3 4 5 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/autocomplete/autocomplete_popup_view_mac_unittest.mm View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/browser_main.cc View 1 2 3 4 5 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/chromeos/options/internet_page_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/wm_overview_title.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/cocoa/download_item_cell.mm View 1 2 3 4 5 2 chunks +4 lines, -6 lines 0 comments Download
M chrome/browser/cocoa/location_bar/ev_bubble_decoration.mm View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/status_bubble_mac.mm View 1 2 3 4 5 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/gtk/bookmark_utils_gtk.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/gtk/options/fonts_page_gtk.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/gtk/tabs/tab_renderer_gtk.h View 4 5 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/gtk/tabs/tab_renderer_gtk.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/remoting/setup_flow.cc View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/sync/sync_setup_flow.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/about_chrome_view.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/views/autocomplete/autocomplete_popup_contents_view.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/views/constrained_window_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/download_item_view.cc View 1 2 3 4 5 5 chunks +9 lines, -8 lines 0 comments Download
M chrome/browser/views/frame/app_panel_browser_frame_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/frame/opaque_browser_frame_view.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/views/location_bar/location_bar_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/options/advanced_contents_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/options/content_exceptions_table_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/options/fonts_page_view.cc View 1 2 3 4 5 3 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/views/options/languages_page_view.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/browser/views/sad_tab_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/shell_dialogs_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/status_bubble_views.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/tabs/base_tab.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/views/theme_install_bubble_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/extension_action.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M gfx/canvas_skia_linux.cc View 1 2 3 4 5 3 chunks +7 lines, -4 lines 0 comments Download
M gfx/canvas_skia_mac.mm View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M gfx/canvas_skia_win.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M gfx/font.h View 1 2 3 4 5 2 chunks +47 lines, -221 lines 0 comments Download
A gfx/font.cc View 2 1 chunk +85 lines, -0 lines 0 comments Download
M gfx/font_gtk.cc View 1 2 3 4 5 1 chunk +0 lines, -152 lines 0 comments Download
D gfx/font_mac.mm View 1 2 3 4 5 1 chunk +0 lines, -92 lines 0 comments Download
D gfx/font_skia.cc View 1 2 3 4 5 1 chunk +0 lines, -255 lines 0 comments Download
M gfx/font_unittest.cc View 1 2 3 4 5 3 chunks +21 lines, -21 lines 0 comments Download
D gfx/font_win.cc View 1 2 3 4 5 1 chunk +0 lines, -216 lines 0 comments Download
M gfx/gfx.gyp View 1 2 3 4 5 3 chunks +8 lines, -4 lines 0 comments Download
M gfx/native_widget_types.h View 1 2 3 4 5 4 chunks +7 lines, -0 lines 0 comments Download
A gfx/platform_font.h View 2 3 4 1 chunk +78 lines, -0 lines 0 comments Download
A gfx/platform_font_gtk.h View 2 3 4 1 chunk +111 lines, -0 lines 0 comments Download
A + gfx/platform_font_gtk.cc View 1 2 3 4 chunks +291 lines, -112 lines 0 comments Download
A gfx/platform_font_mac.h View 2 3 4 1 chunk +57 lines, -0 lines 0 comments Download
A + gfx/platform_font_mac.mm View 1 2 3 3 chunks +87 lines, -37 lines 0 comments Download
A gfx/platform_font_win.h View 2 3 4 1 chunk +131 lines, -0 lines 0 comments Download
A + gfx/platform_font_win.cc View 1 2 5 chunks +153 lines, -101 lines 0 comments Download
M printing/printed_document.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M printing/printed_document_win.cc View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M views/controls/button/checkbox.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/button/native_button.cc View 1 2 3 4 5 2 chunks +16 lines, -9 lines 0 comments Download
M views/controls/button/native_button_gtk.cc View 1 2 3 4 5 2 chunks +4 lines, -5 lines 0 comments Download
M views/controls/button/native_button_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/button/text_button.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/combobox/native_combobox_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/label.cc View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M views/controls/label_unittest.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M views/controls/link.cc View 1 2 3 4 5 1 chunk +4 lines, -4 lines 0 comments Download
M views/controls/listbox/native_listbox_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/menu/menu_config_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/menu/menu_item_view_gtk.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M views/controls/menu/menu_item_view_win.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M views/controls/menu/menu_win.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M views/controls/menu/native_menu_gtk.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M views/controls/menu/native_menu_win.cc View 1 2 3 4 5 2 chunks +4 lines, -3 lines 0 comments Download
M views/controls/tabbed_pane/native_tabbed_pane_win.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/table/table_view.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/textfield/gtk_views_entry.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/textfield/gtk_views_textview.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/controls/textfield/native_textfield_gtk.cc View 1 2 3 4 5 1 chunk +1 line, -2 lines 0 comments Download
M views/controls/textfield/native_textfield_win.cc View 1 2 3 4 5 1 chunk +2 lines, -1 line 0 comments Download
M views/controls/textfield/textfield.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/drag_utils.cc View 1 2 3 4 5 2 chunks +3 lines, -3 lines 0 comments Download
M views/view_text_utils.cc View 1 2 3 4 5 4 chunks +6 lines, -6 lines 0 comments Download
M views/widget/tooltip_manager_gtk.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M views/widget/tooltip_manager_win.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download
M views/window/custom_frame_view.cc View 1 2 3 4 5 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Ben Goodger (Google)
Review tip: Review the gfx/ bits first, the rest is just changing to the new ...
10 years, 4 months ago (2010-08-06 20:35:27 UTC) #1
sky
I had one general comment before I continue the review. Let me know what you ...
10 years, 4 months ago (2010-08-06 23:23:42 UTC) #2
Ben Goodger (Google)
OK, I updated with the refcounting changes.
10 years, 4 months ago (2010-08-09 18:27:19 UTC) #3
sky
http://codereview.chromium.org/3083022/diff/20006/32012 File chrome/browser/autocomplete/autocomplete_popup_view_mac.mm (right): http://codereview.chromium.org/3083022/diff/20006/32012#newcode409 chrome/browser/autocomplete/autocomplete_popup_view_mac.mm:409: (int)resultFontSize); static_cast http://codereview.chromium.org/3083022/diff/20006/32017 File chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm (right): http://codereview.chromium.org/3083022/diff/20006/32017#newcode32 chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm:32: (int)[nsfont ...
10 years, 4 months ago (2010-08-09 20:35:10 UTC) #4
sky
10 years, 4 months ago (2010-08-09 21:02:41 UTC) #5
LGTM

http://codereview.chromium.org/3083022/diff/78002/85032
File chrome/browser/views/options/fonts_page_view.cc (right):

http://codereview.chromium.org/3083022/diff/78002/85032#newcode212
chrome/browser/views/options/fonts_page_view.cc:212: int font_size =
gfx::Font(font).GetFontSize();
font.GetFontSize

Powered by Google App Engine
This is Rietveld 408576698