From 112f72bb04df73ac5757dc5f0530159f4a2329e5 Mon Sep 17 00:00:00 2001 From: "jcampan@chromium.org" Date: Fri, 24 Apr 2009 06:38:58 +0000 Subject: The previous behavior of not focusing the HWND when focusing a checkbox/radio-button was preventing focus to work as expected on these controls. It would leave the previous HWND focused, causing problems. BUG=10856 TEST=Open the Option dialog. Click the "Show home button..." checkbox. The close button should lose focus, the checkbox should get focus. Press space, the checkbox state should change. Click on a radio-button, it should become selected and get focused. Press the up/down arrow. The next/previous radio-button should get selected and focused. Review URL: http://codereview.chromium.org/93114 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14417 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/views/controls/button/native_button_win.cc | 5 ----- chrome/views/controls/button/native_button_win.h | 1 - 2 files changed, 6 deletions(-) diff --git a/chrome/views/controls/button/native_button_win.cc b/chrome/views/controls/button/native_button_win.cc index 61d3b58..a6cf075 100644 --- a/chrome/views/controls/button/native_button_win.cc +++ b/chrome/views/controls/button/native_button_win.cc @@ -148,11 +148,6 @@ void NativeCheckboxWin::SetPushed(bool pushed) { SendMessage(GetHWND(), BM_SETSTATE, pushed, 0); } -void NativeCheckboxWin::SetFocus() { - // The focus should stay on the views::Checkbox (more precisely, on the - // label, which is a view). -} - bool NativeCheckboxWin::OnKeyDown(int vkey) { // Override the NativeButtonWin behavior which triggers the button on enter // key presses when focused. diff --git a/chrome/views/controls/button/native_button_win.h b/chrome/views/controls/button/native_button_win.h index 0a1a572..f9dbcaf 100644 --- a/chrome/views/controls/button/native_button_win.h +++ b/chrome/views/controls/button/native_button_win.h @@ -65,7 +65,6 @@ class NativeCheckboxWin : public NativeButtonWin { virtual bool OnKeyDown(int vkey); // Overridden from NativeControlWin: - virtual void SetFocus(); virtual bool ProcessMessage(UINT message, WPARAM w_param, LPARAM l_param, -- cgit v1.1