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

Issue 10107014: Migrate WebKit "global script" font prefs. (Closed)

Created:
8 years, 8 months ago by falken
Modified:
8 years, 7 months ago
CC:
chromium-reviews, jam, mihaip+watch_chromium.org, joi+watch-content_chromium.org, Aaron Boodman, arv (Not doing code reviews), darin-cc_chromium.org, jungshik at Google, Bernhard Bauer, mnaganov (inactive)
Visibility:
Public.

Description

Migrate WebKit "global script" font prefs. The effect is to migrate a pref like webkit.webprefs.global.standard_font_family to webkit.webprefs.fonts.standard.Zyyy This has two motivations: 1) Undo the migration of font prefs to the "global" (as opposed to per-tab) namespace, as planned here: <http://codereview.chromium.org/9838050>;. There are still more prefs to move out of "global" after this patch. 2) Move the "global script" (as opposed to per-script) font prefs into the per-script font maps, under the script code "Zyyy" (the ISO 15924 code for the "Common" script). This is consistent with WebKit-side settings and should simplify the code overall as we no longer have to special case the global script vs the per-script fonts. TBR=gene for chrome/browser/printing BUG=123812 TEST=browser_tests --gtest_filter=PrefsTab* and ExtensionApiTest.Font* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137835

Patch Set 1 #

Patch Set 2 : sync #

Patch Set 3 : compile fixes #

Total comments: 10

Patch Set 4 : sync #

Patch Set 5 : fix test failures after sync #

Patch Set 6 : review comments #

Total comments: 9

Patch Set 7 : sync #

Patch Set 8 : review comments #

Total comments: 12

Patch Set 9 : sync up #

Patch Set 10 : review comments #

Total comments: 1

Patch Set 11 : sync #

Patch Set 12 : review comments #

Total comments: 4

Patch Set 13 : sync #

Patch Set 14 : use constant "Zyyy" #

Patch Set 15 : fix after sync #

Total comments: 8

Patch Set 16 : sync #

Patch Set 17 : review comments #

Total comments: 2

Patch Set 18 : sync #

Unified diffs Side-by-side diffs Delta from patch set Stats (+381 lines, -243 lines) Patch
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +1 line, -14 lines 0 comments Download
M chrome/browser/extensions/extension_font_settings_api.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +23 lines, -54 lines 0 comments Download
M chrome/browser/extensions/extension_font_settings_apitest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/prefs/pref_service_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/printing/cloud_print/cloud_print_setup_flow.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/options2/font_settings.html View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/ui/prefs/prefs_tab_helper.cc View 1 2 3 4 5 6 7 8 9 10 11 6 chunks +86 lines, -44 lines 0 comments Download
M chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 6 chunks +84 lines, -21 lines 0 comments Download
M chrome/browser/ui/webui/options2/font_settings_handler2.cc View 1 2 3 2 chunks +9 lines, -9 lines 0 comments Download
M chrome/browser/ui/webui/options2/font_settings_utils2_mac.mm View 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/common/extensions/api/experimental_font_settings.json View 1 2 3 4 5 6 7 8 9 10 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/common/extensions/docs/experimental.fontSettings.html View 1 2 3 4 5 6 7 8 9 10 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +16 lines, -6 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +18 lines, -8 lines 0 comments Download
M chrome/test/data/extensions/api_test/font_settings/standard/test.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -1 line 0 comments Download
A chrome/test/data/profiles/webkit_global_reverse_migration/Default/Preferences View 1 chunk +14 lines, -0 lines 0 comments Download
M content/common/view_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +0 lines, -6 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -4 lines 0 comments Download
M ppapi/shared_impl/ppapi_preferences.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -5 lines 0 comments Download
M ppapi/shared_impl/ppapi_preferences.cc View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -6 lines 0 comments Download
M ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +24 lines, -6 lines 0 comments Download
M ppapi/shared_impl/private/ppb_font_shared.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 4 chunks +24 lines, -6 lines 0 comments Download
M webkit/glue/webpreferences.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +7 lines, -7 lines 0 comments Download
M webkit/glue/webpreferences.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +17 lines, -15 lines 0 comments Download
M webkit/tools/test_shell/test_shell.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +18 lines, -9 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
falken
tony: Can you review please? jshin, bauerb, mnaganov: FYI
8 years, 8 months ago (2012-04-17 12:44:00 UTC) #1
falken
darin: Could you take a look, particularly the changes under webkit/? I think tony@ is ...
8 years, 8 months ago (2012-04-18 08:08:01 UTC) #2
darin (slow to review)
I think Tony should review this. I don't have enough context to be helpful. http://codereview.chromium.org/10107014/diff/11028/webkit/glue/webpreferences.cc ...
8 years, 8 months ago (2012-04-23 17:00:34 UTC) #3
falken
Darin, thanks for taking a look. I'll wait for Tony's review. http://codereview.chromium.org/10107014/diff/11028/webkit/glue/webpreferences.cc File webkit/glue/webpreferences.cc (right): ...
8 years, 8 months ago (2012-04-24 01:27:10 UTC) #4
darin (slow to review)
On Mon, Apr 23, 2012 at 6:27 PM, <falken@chromium.org> wrote: > Darin, thanks for taking ...
8 years, 8 months ago (2012-04-24 03:14:46 UTC) #5
falken
On 2012/04/24 03:14:46, darin wrote: > On Mon, Apr 23, 2012 at 6:27 PM, <mailto:falken@chromium.org> ...
8 years, 8 months ago (2012-04-24 04:57:35 UTC) #6
tony
Can we get the Zyyy constant from ICU? http://codereview.chromium.org/10107014/diff/11028/chrome/browser/ui/prefs/prefs_tab_helper_browsertest2.cc File chrome/browser/ui/prefs/prefs_tab_helper_browsertest2.cc (right): http://codereview.chromium.org/10107014/diff/11028/chrome/browser/ui/prefs/prefs_tab_helper_browsertest2.cc#newcode55 chrome/browser/ui/prefs/prefs_tab_helper_browsertest2.cc:55: IN_PROC_BROWSER_TEST_F(PrefsTabHelperBrowserTest2, ...
8 years, 8 months ago (2012-04-27 17:22:18 UTC) #7
falken
Thanks for the review! Good idea to use ICU to get Zyyy, I've changed it ...
8 years, 7 months ago (2012-05-09 06:48:08 UTC) #8
tony
LGTM http://codereview.chromium.org/10107014/diff/31031/chrome/browser/ui/prefs/prefs_tab_helper_browsertest2.cc File chrome/browser/ui/prefs/prefs_tab_helper_browsertest2.cc (right): http://codereview.chromium.org/10107014/diff/31031/chrome/browser/ui/prefs/prefs_tab_helper_browsertest2.cc#newcode30 chrome/browser/ui/prefs/prefs_tab_helper_browsertest2.cc:30: .AppendASCII("webkit_global_reverse_migration") E.g., you could have PrefsTabHelperBrowserTest2 inherit from ...
8 years, 7 months ago (2012-05-09 17:11:15 UTC) #9
falken
Tony, thanks for the review! Can the following OWNERS please review? viettrungluu: ppapi gene: cloud_print ...
8 years, 7 months ago (2012-05-11 11:04:14 UTC) #10
jschuh
Sorry, you'll need a different owner for content/common. I'm on that list only for changes ...
8 years, 7 months ago (2012-05-11 13:24:09 UTC) #11
Matt Perry
extensions lgtm http://codereview.chromium.org/10107014/diff/33004/chrome/browser/extensions/extension_font_settings_api.cc File chrome/browser/extensions/extension_font_settings_api.cc (right): http://codereview.chromium.org/10107014/diff/33004/chrome/browser/extensions/extension_font_settings_api.cc#newcode61 chrome/browser/extensions/extension_font_settings_api.cc:61: if (!details->HasKey(kScriptKey)) use braces when an else ...
8 years, 7 months ago (2012-05-11 20:47:14 UTC) #12
Evan Stade
options2 lgtm
8 years, 7 months ago (2012-05-11 21:40:14 UTC) #13
Peter Kasting
browser/ui rubber-stamp LGTM; questions below because I am somewhat clueless http://codereview.chromium.org/10107014/diff/33004/chrome/browser/ui/prefs/prefs_tab_helper.cc File chrome/browser/ui/prefs/prefs_tab_helper.cc (left): http://codereview.chromium.org/10107014/diff/33004/chrome/browser/ui/prefs/prefs_tab_helper.cc#oldcode416 ...
8 years, 7 months ago (2012-05-11 22:01:06 UTC) #14
falken
Thanks for the reviews! viettrungluu: ping for ppapi changes http://codereview.chromium.org/10107014/diff/33004/chrome/browser/extensions/extension_font_settings_api.cc File chrome/browser/extensions/extension_font_settings_api.cc (right): http://codereview.chromium.org/10107014/diff/33004/chrome/browser/extensions/extension_font_settings_api.cc#newcode61 chrome/browser/extensions/extension_font_settings_api.cc:61: ...
8 years, 7 months ago (2012-05-14 09:08:22 UTC) #15
Peter Kasting
http://codereview.chromium.org/10107014/diff/33004/chrome/browser/extensions/extension_font_settings_api.cc File chrome/browser/extensions/extension_font_settings_api.cc (right): http://codereview.chromium.org/10107014/diff/33004/chrome/browser/extensions/extension_font_settings_api.cc#newcode61 chrome/browser/extensions/extension_font_settings_api.cc:61: if (!details->HasKey(kScriptKey)) On 2012/05/14 09:08:23, falken wrote: > On ...
8 years, 7 months ago (2012-05-14 18:18:32 UTC) #16
falken
On 2012/05/14 18:18:32, Peter Kasting wrote: > http://codereview.chromium.org/10107014/diff/33004/chrome/browser/extensions/extension_font_settings_api.cc > File chrome/browser/extensions/extension_font_settings_api.cc (right): > > http://codereview.chromium.org/10107014/diff/33004/chrome/browser/extensions/extension_font_settings_api.cc#newcode61 ...
8 years, 7 months ago (2012-05-15 03:38:29 UTC) #17
falken
viettrungluu: friendly ping
8 years, 7 months ago (2012-05-15 03:42:40 UTC) #18
viettrungluu
+brettw http://codereview.chromium.org/10107014/diff/33010/ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc File ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc (right): http://codereview.chromium.org/10107014/diff/33010/ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc#newcode7 ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc:7: #include <unicode/uscript.h> This is a dependency on ICU, ...
8 years, 7 months ago (2012-05-15 17:21:17 UTC) #19
brettw
What is "Zyyy"? http://codereview.chromium.org/10107014/diff/33010/ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc File ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc (right): http://codereview.chromium.org/10107014/diff/33010/ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc#newcode42 ppapi/shared_impl/private/ppb_browser_font_trusted_shared.cc:42: const char* kCommonScript = uscript_getShortName(USCRIPT_COMMON); Right.
8 years, 7 months ago (2012-05-15 22:53:10 UTC) #20
falken
Thanks for the reviews! On 2012/05/15 22:53:10, brettw wrote: > What is "Zyyy"? The font ...
8 years, 7 months ago (2012-05-16 02:08:07 UTC) #21
falken
On 2012/05/16 02:08:07, falken wrote: > Thanks for the reviews! > > On 2012/05/15 22:53:10, ...
8 years, 7 months ago (2012-05-16 04:37:37 UTC) #22
viettrungluu
http://codereview.chromium.org/10107014/diff/37020/webkit/glue/webpreferences.cc File webkit/glue/webpreferences.cc (right): http://codereview.chromium.org/10107014/diff/37020/webkit/glue/webpreferences.cc#newcode8 webkit/glue/webpreferences.cc:8: #include <unicode/uscript.h> As I said elsewhere, these are really ...
8 years, 7 months ago (2012-05-16 13:27:57 UTC) #23
falken
Thanks for the review. https://chromiumcodereview.appspot.com/10107014/diff/37020/webkit/glue/webpreferences.cc File webkit/glue/webpreferences.cc (right): https://chromiumcodereview.appspot.com/10107014/diff/37020/webkit/glue/webpreferences.cc#newcode8 webkit/glue/webpreferences.cc:8: #include <unicode/uscript.h> On 2012/05/16 13:27:58, ...
8 years, 7 months ago (2012-05-17 07:08:41 UTC) #24
viettrungluu
LGTM otherwise. https://chromiumcodereview.appspot.com/10107014/diff/47003/webkit/glue/webpreferences.h File webkit/glue/webpreferences.h (right): https://chromiumcodereview.appspot.com/10107014/diff/47003/webkit/glue/webpreferences.h#newcode36 webkit/glue/webpreferences.h:36: static const char kCommonScript[]; To get this ...
8 years, 7 months ago (2012-05-18 02:44:52 UTC) #25
falken
Thanks all for the reviews. I'll go ahead and land this and hopefully get the ...
8 years, 7 months ago (2012-05-18 05:58:26 UTC) #26
brettw
ppapi/webkit lgtm
8 years, 7 months ago (2012-05-18 05:58:34 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/falken@chromium.org/10107014/47030
8 years, 7 months ago (2012-05-18 06:05:26 UTC) #28
commit-bot: I haz the power
Change committed as 137835
8 years, 7 months ago (2012-05-18 07:20:35 UTC) #29
tony
8 years, 7 months ago (2012-05-18 17:03:42 UTC) #30
Using the literal + a comment is fine.  It looks like there's some other code
that puts the EXPORT before "static const", but maybe those symbols aren't
actually used?
content/browser/accessibility/browser_accessibility_win.h:86:  CONTENT_EXPORT
static const char16 kEmbeddedCharacter[];
content/test/net/url_request_slow_download_job.h:24:  CONTENT_EXPORT static
const char kUnknownSizeUrl[];

Maybe the magic is to use array notation rather than *?

Powered by Google App Engine
This is Rietveld 408576698