diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 22:45:02 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-02 22:45:02 +0000 |
commit | 38a85719446bd28dba002eb661b7518aa5b8cd3d (patch) | |
tree | 138c52a65bc9cf20cbdbe8c38e69d430ae6f6f80 /chrome/browser/renderer_preferences_util.cc | |
parent | 06bc5d9a46ad798452b317fc47be8acd5ff041c5 (diff) | |
download | chromium_src-38a85719446bd28dba002eb661b7518aa5b8cd3d.zip chromium_src-38a85719446bd28dba002eb661b7518aa5b8cd3d.tar.gz chromium_src-38a85719446bd28dba002eb661b7518aa5b8cd3d.tar.bz2 |
chromeos: Update focus ring color in WebKit.
This sets WebKit's focus ring color to #4d90fe;
USE_DEFAULT_RENDER_THEME-defining builds like Chrome OS
appear to have been previously using the default of #e59700
from RenderThemeChromiumSkia.
It also makes RenderViewImpl honor the caret blink interval
for USE_DEFAULT_RENDER_THEME instead of just for GTK.
BUG=153080
TEST=manual: focus rings are blue instead of orange
Review URL: https://chromiumcodereview.appspot.com/11673011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@174881 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/renderer_preferences_util.cc')
-rw-r--r-- | chrome/browser/renderer_preferences_util.cc | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/chrome/browser/renderer_preferences_util.cc b/chrome/browser/renderer_preferences_util.cc index e4d13b9..3989239 100644 --- a/chrome/browser/renderer_preferences_util.cc +++ b/chrome/browser/renderer_preferences_util.cc @@ -8,6 +8,7 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/common/pref_names.h" #include "content/public/common/renderer_preferences.h" +#include "third_party/skia/include/core/SkColor.h" #if defined(OS_LINUX) || defined(OS_ANDROID) #include "ui/gfx/font_render_params_linux.h" @@ -97,21 +98,21 @@ void UpdateFromSystemSettings( theme_service->get_inactive_selection_bg_color(); prefs->inactive_selection_fg_color = theme_service->get_inactive_selection_fg_color(); + + const base::TimeDelta cursor_blink_time = gfx::GetCursorBlinkCycle(); + prefs->caret_blink_interval = + cursor_blink_time.InMilliseconds() ? + cursor_blink_time.InMilliseconds() / kGtkCursorBlinkCycleFactor : + 0; #elif defined(USE_DEFAULT_RENDER_THEME) + prefs->focus_ring_color = SkColorSetRGB(0x4D, 0x90, 0xFE); + // This color is 0x544d90fe modulated with 0xffffff. prefs->active_selection_bg_color = SkColorSetRGB(0xCB, 0xE4, 0xFA); prefs->active_selection_fg_color = SK_ColorBLACK; prefs->inactive_selection_bg_color = SkColorSetRGB(0xEA, 0xEA, 0xEA); prefs->inactive_selection_fg_color = SK_ColorBLACK; -#endif -#if defined(TOOLKIT_GTK) - const base::TimeDelta cursor_blink_time = gfx::GetCursorBlinkCycle(); - prefs->caret_blink_interval = - cursor_blink_time.InMilliseconds() ? - cursor_blink_time.InMilliseconds() / kGtkCursorBlinkCycleFactor : - 0; -#elif defined(USE_AURA) // WebKit accepts a single parameter to control the interval over which the // cursor is shown or hidden, so divide Views's time for the full cycle by two // and then convert to seconds. |