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

Issue 7606028: Pass per-script fonts to WebKit settings. (Closed)

Created:
9 years, 4 months ago by falken
Modified:
9 years ago
CC:
chromium-reviews, Avi (use Gerrit), finnur+watch_chromium.org, jam, joi+watch-content_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org, jshin+watch_chromium.org
Visibility:
Public.

Description

Pass per-script fonts to WebKit settings. WebKit now has per-script font settings (https://bugs.webkit.org/show_bug.cgi?id=20797). This change adds per-script font preferences to Chromium and passes them to the WebKit settings. For this first patch, default per-script fonts are defined only on Chrome OS, and only for Arabic and CJK scripts. It specifies the default fonts in locale_settings_cros.grd. The preferences are passed to WebPreferences in render_view_host_delegate_helper.cc (in the same manner as current font preferences). BUG=92302 TEST=manually Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=98024

Patch Set 1 #

Total comments: 12

Patch Set 2 : pref strings instead of dictionary #

Total comments: 10

Patch Set 3 : updated patch #

Total comments: 4

Patch Set 4 : address Mattias's nits #

Total comments: 2

Patch Set 5 : revised patch to address sky's comment #

Total comments: 10

Patch Set 6 : address brettw's comments #

Total comments: 2

Patch Set 7 : patch to commit #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+399 lines, -0 lines) Patch
M chrome/app/resources/locale_settings_cros.grd View 1 2 3 4 5 1 chunk +114 lines, -0 lines 0 comments Download
M chrome/browser/tab_contents/render_view_host_delegate_helper.cc View 1 2 3 4 5 6 2 chunks +31 lines, -0 lines 0 comments Download
M chrome/browser/ui/tab_contents/tab_contents_wrapper.cc View 1 2 3 4 5 6 2 chunks +73 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 2 chunks +37 lines, -0 lines 1 comment Download
M chrome/common/pref_names.cc View 1 2 3 4 2 chunks +62 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 1 chunk +6 lines, -0 lines 0 comments Download
M webkit/glue/webpreferences.h View 1 2 3 4 5 1 chunk +10 lines, -0 lines 0 comments Download
M webkit/glue/webpreferences.cc View 1 2 3 4 5 6 3 chunks +66 lines, -0 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
falken
Can you please review my patch? I chose reviewers from OWNERS files: brettw: chrome/browser/tab_contents, content/common ...
9 years, 4 months ago (2011-08-10 13:06:53 UTC) #1
tony
Jungshik would be a good reviewer of this too. http://codereview.chromium.org/7606028/diff/1/chrome/browser/tab_contents/render_view_host_delegate_helper.cc File chrome/browser/tab_contents/render_view_host_delegate_helper.cc (right): http://codereview.chromium.org/7606028/diff/1/chrome/browser/tab_contents/render_view_host_delegate_helper.cc#newcode305 chrome/browser/tab_contents/render_view_host_delegate_helper.cc:305: ...
9 years, 4 months ago (2011-08-10 19:23:40 UTC) #2
falken
Thanks for the review! I just have a comment about the pref dictionary. http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File ...
9 years, 4 months ago (2011-08-11 08:54:19 UTC) #3
tony
On 2011/08/11 08:54:19, falken wrote: > > This would be good, but if I register ...
9 years, 4 months ago (2011-08-11 17:01:36 UTC) #4
Mattias Nissler (ping if slow)
http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode306 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:306: l10n_util::GetStringUTF16(IDS_STANDARD_FONT_FAMILY_JAPANESE)); On 2011/08/11 08:54:20, falken wrote: > On 2011/08/10 ...
9 years, 4 months ago (2011-08-12 09:24:12 UTC) #5
falken
Thanks for the comments! http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode306 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:306: l10n_util::GetStringUTF16(IDS_STANDARD_FONT_FAMILY_JAPANESE)); > What you can ...
9 years, 4 months ago (2011-08-12 09:36:59 UTC) #6
Mattias Nissler (ping if slow)
http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode306 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:306: l10n_util::GetStringUTF16(IDS_STANDARD_FONT_FAMILY_JAPANESE)); On 2011/08/12 09:37:00, falken wrote: > > What ...
9 years, 4 months ago (2011-08-12 09:51:05 UTC) #7
falken
http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7606028/diff/1/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode306 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:306: l10n_util::GetStringUTF16(IDS_STANDARD_FONT_FAMILY_JAPANESE)); On 2011/08/12 09:51:05, Mattias Nissler wrote: > On ...
9 years, 4 months ago (2011-08-15 05:28:46 UTC) #8
falken
I've revised the patch per comments from Tony and Mattias. Please have another look.
9 years, 4 months ago (2011-08-15 10:05:09 UTC) #9
jungshik at Google
http://codereview.chromium.org/7606028/diff/14002/chrome/common/pref_names.cc File chrome/common/pref_names.cc (right): http://codereview.chromium.org/7606028/diff/14002/chrome/common/pref_names.cc#newcode124 chrome/common/pref_names.cc:124: "webkit.webprefs.fantasy_font_family_map"; I wonder if we can use the following ...
9 years, 4 months ago (2011-08-15 22:50:40 UTC) #10
tony
http://codereview.chromium.org/7606028/diff/14002/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7606028/diff/14002/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode302 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:302: IDS_STANDARD_FONT_FAMILY_JAPANESE, PrefService::UNSYNCABLE_PREF); Nit: We may want to move all ...
9 years, 4 months ago (2011-08-15 23:08:28 UTC) #11
jungshik at Google
http://codereview.chromium.org/7606028/diff/14002/webkit/glue/webpreferences.cc File webkit/glue/webpreferences.cc (right): http://codereview.chromium.org/7606028/diff/14002/webkit/glue/webpreferences.cc#newcode138 webkit/glue/webpreferences.cc:138: int32 script = u_getPropertyValueEnum(UCHAR_SCRIPT, (it->first).c_str()); Does it work with ...
9 years, 4 months ago (2011-08-15 23:12:42 UTC) #12
falken
Thanks for the review comments. I've uploaded a updated patch. http://codereview.chromium.org/7606028/diff/14002/chrome/common/pref_names.cc File chrome/common/pref_names.cc (right): http://codereview.chromium.org/7606028/diff/14002/chrome/common/pref_names.cc#newcode124 ...
9 years, 4 months ago (2011-08-16 07:46:44 UTC) #13
Mattias Nissler (ping if slow)
LGTM for the prefs part, some nits. http://codereview.chromium.org/7606028/diff/20001/webkit/glue/webpreferences.cc File webkit/glue/webpreferences.cc (right): http://codereview.chromium.org/7606028/diff/20001/webkit/glue/webpreferences.cc#newcode95 webkit/glue/webpreferences.cc:95: void setStandardFontFamilyWrapper(WebSettings* ...
9 years, 4 months ago (2011-08-16 09:22:45 UTC) #14
falken
Thanks! http://codereview.chromium.org/7606028/diff/20001/webkit/glue/webpreferences.cc File webkit/glue/webpreferences.cc (right): http://codereview.chromium.org/7606028/diff/20001/webkit/glue/webpreferences.cc#newcode95 webkit/glue/webpreferences.cc:95: void setStandardFontFamilyWrapper(WebSettings* settings, On 2011/08/16 09:22:45, Mattias Nissler ...
9 years, 4 months ago (2011-08-16 12:20:33 UTC) #15
tony
LGTM2.
9 years, 4 months ago (2011-08-16 16:38:24 UTC) #16
sky
LGTM http://codereview.chromium.org/7606028/diff/21011/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc File chrome/browser/ui/tab_contents/tab_contents_wrapper.cc (right): http://codereview.chromium.org/7606028/diff/21011/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc#newcode215 chrome/browser/ui/tab_contents/tab_contents_wrapper.cc:215: static void RegisterFontFamilyMap(PrefService* prefs, Move this into the ...
9 years, 4 months ago (2011-08-17 17:06:31 UTC) #17
falken
brettw, can you please review? I need OWNER approval for chrome/browser/tab_contents and content/common. Thanks! http://codereview.chromium.org/7606028/diff/21011/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc ...
9 years, 4 months ago (2011-08-22 05:00:15 UTC) #18
brettw
http://codereview.chromium.org/7606028/diff/28001/chrome/browser/tab_contents/render_view_host_delegate_helper.cc File chrome/browser/tab_contents/render_view_host_delegate_helper.cc (right): http://codereview.chromium.org/7606028/diff/28001/chrome/browser/tab_contents/render_view_host_delegate_helper.cc#newcode303 chrome/browser/tab_contents/render_view_host_delegate_helper.cc:303: static void FillFontFamilyMap(const PrefService* prefs, Don't put static functions ...
9 years, 4 months ago (2011-08-22 23:23:28 UTC) #19
falken
Thanks for the review. http://codereview.chromium.org/7606028/diff/28001/chrome/browser/tab_contents/render_view_host_delegate_helper.cc File chrome/browser/tab_contents/render_view_host_delegate_helper.cc (right): http://codereview.chromium.org/7606028/diff/28001/chrome/browser/tab_contents/render_view_host_delegate_helper.cc#newcode303 chrome/browser/tab_contents/render_view_host_delegate_helper.cc:303: static void FillFontFamilyMap(const PrefService* prefs, ...
9 years, 4 months ago (2011-08-23 12:05:53 UTC) #20
brettw
LGTM http://codereview.chromium.org/7606028/diff/35001/chrome/browser/tab_contents/render_view_host_delegate_helper.cc File chrome/browser/tab_contents/render_view_host_delegate_helper.cc (right): http://codereview.chromium.org/7606028/diff/35001/chrome/browser/tab_contents/render_view_host_delegate_helper.cc#newcode56 chrome/browser/tab_contents/render_view_host_delegate_helper.cc:56: } // namespace Two spaces before // http://codereview.chromium.org/7606028/diff/35001/webkit/glue/webpreferences.cc ...
9 years, 4 months ago (2011-08-23 17:19:57 UTC) #21
M-A Ruel
http://codereview.chromium.org/7606028/diff/41001/chrome/common/pref_names.h File chrome/common/pref_names.h (right): http://codereview.chromium.org/7606028/diff/41001/chrome/common/pref_names.h#newcode58 chrome/common/pref_names.h:58: extern const char* kWebKitScriptsForFontFamilyMaps[]; !!! Never name a non-const ...
9 years ago (2011-12-14 20:48:00 UTC) #22
falken
9 years ago (2011-12-15 03:27:16 UTC) #23
> Please make it const with:
> extern const char* const kWebKitScriptsForFontFamilyMaps[];
> 
> Thanks.

Thanks for noticing.  I'll fix it.

Powered by Google App Engine
This is Rietveld 408576698