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

Issue 2804001: Mac: More pluming for OOP font loading (Closed)

Created:
10 years, 6 months ago by jeremy
Modified:
9 years, 6 months ago
Reviewers:
Avi (use Gerrit), agl
CC:
chromium-reviews, jam
Visibility:
Public.

Description

Mac: More pluming for OOP font loading * Add font_descriptor and corresponding pluming to send an NSFont over IPC. * Rejigger font_loader to accept an NSFont as input and output an ATSFontContainerRef. The reasoning behind this is that WebKit ultimately controls the font lifetime and we can only deactivate the font container once the font is no longer in use. BUG=29729 Test=Unit tests should pass. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=50076

Patch Set 1 #

Patch Set 2 : foo #

Patch Set 3 : Fix style nites #

Total comments: 3

Patch Set 4 : Fix review comments #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+289 lines, -55 lines) Patch
M chrome/chrome_common.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A chrome/common/font_descriptor_mac.h View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
A chrome/common/font_descriptor_mac.mm View 1 2 1 chunk +20 lines, -0 lines 0 comments Download
A chrome/common/font_descriptor_mac_unittest.mm View 1 2 3 1 chunk +91 lines, -0 lines 1 comment Download
M chrome/common/font_loader_mac.h View 1 2 2 chunks +16 lines, -10 lines 0 comments Download
M chrome/common/font_loader_mac.mm View 1 2 3 3 chunks +15 lines, -40 lines 1 comment Download
M chrome/common/render_messages.h View 1 2 3 2 chunks +19 lines, -0 lines 0 comments Download
M chrome/common/render_messages_internal.h View 1 2 3 2 chunks +10 lines, -0 lines 2 comments Download
M chrome/common/sandbox_mac_fontloading_unittest.mm View 1 2 3 3 chunks +56 lines, -5 lines 0 comments Download
M ipc/ipc_message_utils.h View 1 chunk +27 lines, -0 lines 2 comments Download

Messages

Total messages: 7 (0 generated)
jeremy
10 years, 6 months ago (2010-06-13 09:08:15 UTC) #1
Avi (use Gerrit)
A few nits. http://codereview.chromium.org/2804001/diff/4001/5005 File chrome/common/font_descriptor_mac_unittest.mm (right): http://codereview.chromium.org/2804001/diff/4001/5005#newcode23 chrome/common/font_descriptor_mac_unittest.mm:23: ATSUFontID id2 = CTFontGetPlatformFont(reinterpret_cast<CTFontRef>(font2), 0); CTFontGetPlatformFont ...
10 years, 6 months ago (2010-06-14 20:43:46 UTC) #2
jeremy
All fixed, ready for another look...
10 years, 6 months ago (2010-06-15 07:03:10 UTC) #3
jam
I know next to nothing about fonts, so I defer to Adam.
10 years, 6 months ago (2010-06-15 07:38:29 UTC) #4
Avi (use Gerrit)
LGTM with slight nit http://codereview.chromium.org/2804001/diff/11001/12005 File chrome/common/font_descriptor_mac_unittest.mm (right): http://codereview.chromium.org/2804001/diff/11001/12005#newcode26 chrome/common/font_descriptor_mac_unittest.mm:26: LOG(ERROR) << "ATSUFontIDs for " ...
10 years, 6 months ago (2010-06-15 13:57:47 UTC) #5
agl
http://codereview.chromium.org/2804001/diff/11001/12009 File chrome/common/render_messages_internal.h (right): http://codereview.chromium.org/2804001/diff/11001/12009#newcode1442 chrome/common/render_messages_internal.h:1442: IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_LoadFont, Am I just being dumb, or is the ...
10 years, 6 months ago (2010-06-15 14:10:14 UTC) #6
jeremy
10 years, 6 months ago (2010-06-15 14:26:55 UTC) #7
http://codereview.chromium.org/2804001/diff/11001/12009
File chrome/common/render_messages_internal.h (right):

http://codereview.chromium.org/2804001/diff/11001/12009#newcode1442
chrome/common/render_messages_internal.h:1442:
IPC_SYNC_MESSAGE_CONTROL1_2(ViewHostMsg_LoadFont,
Due to the way the WebKit and Chrome code interact I can't land the
implementation together with the definition since it depends on code on the
WebKit side.

But this basically makes a straightforward call to font_loader.mm .

http://codereview.chromium.org/2804001/diff/11001/12011
File ipc/ipc_message_utils.h (right):

http://codereview.chromium.org/2804001/diff/11001/12011#newcode239
ipc/ipc_message_utils.h:239: const char *data;
Agreed, I wanted to match the definition for double, I'll change both before
landing.

Powered by Google App Engine
This is Rietveld 408576698