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

Issue 7080024: Mac: Part 1 of a fix to get OOP font loading working in the renderer on 10.6.6 . (Closed)

Created:
9 years, 6 months ago by jeremy
Modified:
9 years, 6 months ago
Reviewers:
Robert Sesek, Nico, brettw
CC:
chromium-reviews, joi+watch-content_chromium.org, pam+watch_chromium.org, jam, Paweł Hajdan Jr.
Visibility:
Public.

Description

Mac: Part 1 of a fix to get OOP font loading working in the renderer on 10.6.6 . When the renderer can't load a font due to sandbox restrictions, it sends an IPC over to the browser to return a copy of the font file, which it then activates. Before doing this, the renderer retrieves the ATSFontContainerRef corresponding to the font it couldn't load. This value is unique for each font file and having this value allows the renderer to determine if the font in question has already been retrieved from the browser and activated. Without doing this, the renderer would need to activate a font each time it was requested. In 10.6.6 the function used to get the unique ID from the font in the renderer was changed so it fails in the sandbox (it now tries to access the on-disk font file). In order to work around this, we need to get the unique id on the browser side and send it back over IPC. This is the first part of said change. BUG=72727 TEST=None

Patch Set 1 #

Total comments: 5

Patch Set 2 : Fix review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -19 lines) Patch
M content/browser/renderer_host/render_message_filter.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 1 chunk +7 lines, -4 lines 0 comments Download
M content/common/font_loader_mac.h View 1 chunk +3 lines, -1 line 0 comments Download
M content/common/font_loader_mac.mm View 1 3 chunks +18 lines, -2 lines 0 comments Download
M content/common/sandbox_mac_fontloading_unittest.mm View 1 chunk +3 lines, -1 line 0 comments Download
M content/common/view_messages.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/renderer_webkitclient_impl.cc View 1 2 chunks +26 lines, -8 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
jeremy
brettw: owner approval, rubberstamp is fine. nico, robert: only one of you need review.
9 years, 6 months ago (2011-05-30 09:07:24 UTC) #1
brettw
rubberstamp LGTM http://codereview.chromium.org/7080024/diff/1/content/renderer/renderer_webkitclient_impl.cc File content/renderer/renderer_webkitclient_impl.cc (right): http://codereview.chromium.org/7080024/diff/1/content/renderer/renderer_webkitclient_impl.cc#newcode476 content/renderer/renderer_webkitclient_impl.cc:476: bool RendererWebKitClientImpl::SandboxSupport::loadFont(NSFont* srcFont, Style: the args should ...
9 years, 6 months ago (2011-05-30 13:05:47 UTC) #2
Nico
LGTM with the below addressed http://codereview.chromium.org/7080024/diff/1/content/browser/renderer_host/render_message_filter.cc File content/browser/renderer_host/render_message_filter.cc (right): http://codereview.chromium.org/7080024/diff/1/content/browser/renderer_host/render_message_filter.cc#newcode542 content/browser/renderer_host/render_message_filter.cc:542: if (!ok || font_data_size ...
9 years, 6 months ago (2011-05-30 13:19:37 UTC) #3
commit-bot: I haz the power
9 years, 6 months ago (2011-05-31 08:04:30 UTC) #4
Change committed as 87282

Powered by Google App Engine
This is Rietveld 408576698