summaryrefslogtreecommitdiffstats
path: root/views/controls/textfield
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 16:51:07 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-07 16:51:07 +0000
commit191e5a20da672688d842ad3b5e4c4c7bf8c6c71c (patch)
tree593c9052b68ca3ca24959caadbdcb8d5299f92d7 /views/controls/textfield
parente4221ad535d561b931bd900db9278825adf36b06 (diff)
downloadchromium_src-191e5a20da672688d842ad3b5e4c4c7bf8c6c71c.zip
chromium_src-191e5a20da672688d842ad3b5e4c4c7bf8c6c71c.tar.gz
chromium_src-191e5a20da672688d842ad3b5e4c4c7bf8c6c71c.tar.bz2
Turns on the focus traversal unit-tests and fixed some focus traversal problem:
- in TabbedPaneView, the focus traversable were not properly hooked-up - the NativeTextField was focusing the wrapper view instead of the actual Textfield view. Also in the FocusTraversal unit-test I had to select one of the radio-button that the test uses, as the behavior of focusing a disabled button is different on Windows (it forces any non disabled radio-button to become selected) than on Gtk. BUG=None TEST=Run the unit tests. Review URL: http://codereview.chromium.org/242163 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28263 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/textfield')
-rw-r--r--views/controls/textfield/native_textfield_gtk.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/views/controls/textfield/native_textfield_gtk.cc b/views/controls/textfield/native_textfield_gtk.cc
index 0c72ca2..3d9471f 100644
--- a/views/controls/textfield/native_textfield_gtk.cc
+++ b/views/controls/textfield/native_textfield_gtk.cc
@@ -20,6 +20,10 @@ NativeTextfieldGtk::NativeTextfieldGtk(Textfield* textfield)
: textfield_(textfield) {
if (textfield_->style() & Textfield::STYLE_MULTILINE)
NOTIMPLEMENTED(); // We don't support multiline yet.
+ // Make |textfield| the focused view, so that when we get focused the focus
+ // manager sees |textfield| as the focused view (since we are just a wrapper
+ // view).
+ set_focus_view(textfield);
}
NativeTextfieldGtk::~NativeTextfieldGtk() {