From 2e68f567854b6887e052ac698fdbef61f4f0e08f Mon Sep 17 00:00:00 2001 From: "evan@chromium.org" Date: Fri, 13 Feb 2009 00:40:41 +0000 Subject: Fix tiny fonts in Mac/Linux. Tony deserves credit for this. Review URL: http://codereview.chromium.org/21323 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9716 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/tab_contents/web_contents.cc | 9 +++++++++ chrome/common/l10n_util.cc | 1 + 2 files changed, 10 insertions(+) diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc index 010957a..e3de324 100644 --- a/chrome/browser/tab_contents/web_contents.cc +++ b/chrome/browser/tab_contents/web_contents.cc @@ -1168,6 +1168,7 @@ GURL WebContents::GetAlternateErrorPageURL() const { WebPreferences WebContents::GetWebkitPrefs() { // Initialize web_preferences_ to chrome defaults. WebPreferences web_prefs; +#if defined(OS_WIN) PrefService* prefs = profile()->GetPrefs(); web_prefs.fixed_font_family = @@ -1244,6 +1245,14 @@ WebPreferences WebContents::GetWebkitPrefs() { web_prefs.default_encoding = prefs->GetString( prefs::kDefaultCharset); } +#else + // TODO(port): we skip doing the above settings because the default values + // for these prefs->GetFoo() calls aren't filled in yet. By leaving the + // the WebPreferences alone, we get the moderately-sane default values out + // of WebKit. Remove this ifdef block once we properly load font sizes, etc. + NOTIMPLEMENTED(); +#endif + DCHECK(!web_prefs.default_encoding.empty()); return web_prefs; } diff --git a/chrome/common/l10n_util.cc b/chrome/common/l10n_util.cc index 1aeea0a..a8056a7 100644 --- a/chrome/common/l10n_util.cc +++ b/chrome/common/l10n_util.cc @@ -324,6 +324,7 @@ std::wstring GetString(int message_id) { return rb.GetLocalizedString(message_id); #else NOTIMPLEMENTED(); // TODO(port): Real implementation of GetString. + // Return something non-empty so callers don't freak out. return L"true"; #endif } -- cgit v1.1