diff options
author | dtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 21:23:58 +0000 |
---|---|---|
committer | dtseng@chromium.org <dtseng@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-12 21:23:58 +0000 |
commit | 9e04f976c6db85bf6170931ee1f3d2fb9ca8401b (patch) | |
tree | 9957680480a93d5cb85a0d7ea99e1de5a35de2cb /views | |
parent | 902ee7eaff2875a7e3e16c9d3e2d591c18fc323a (diff) | |
download | chromium_src-9e04f976c6db85bf6170931ee1f3d2fb9ca8401b.zip chromium_src-9e04f976c6db85bf6170931ee1f3d2fb9ca8401b.tar.gz chromium_src-9e04f976c6db85bf6170931ee1f3d2fb9ca8401b.tar.bz2 |
Fix the announcement of combo boxes by excluding them from firing events on our combobox IAccessible. Since we already call SetFocus on the native combo box, this event will go to the AT correctly, but this IAccessible won't be hooked up to the rest of the IAccessible tree. Also, any changes made in combobox.cc/h concerning accessibility won't show up when the combobox receives focus.
BUG=48703
TEST=none
Review URL: http://codereview.chromium.org/2937004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52132 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/native_control_win.cc | 7 | ||||
-rw-r--r-- | views/controls/native_control_win.h | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/views/controls/native_control_win.cc b/views/controls/native_control_win.cc index 217fee1..d9cd230 100644 --- a/views/controls/native_control_win.cc +++ b/views/controls/native_control_win.cc @@ -96,7 +96,12 @@ void NativeControlWin::Focus() { // Since we are being wrapped by a view, accessibility should receive // the super class as the focused view. View* parent_view = GetParent(); - if (parent_view->HasFocus()) + + // Due to some controls not behaving as expected without having + // a native win32 control, we exclude the following from sending + // their IAccessible as focus events. + if (parent_view->GetClassName() != views::Combobox::kViewClassName && + parent_view->HasFocus()) parent_view->NotifyAccessibilityEvent(AccessibilityTypes::EVENT_FOCUS); } diff --git a/views/controls/native_control_win.h b/views/controls/native_control_win.h index c9c18a6..1fad2a8 100644 --- a/views/controls/native_control_win.h +++ b/views/controls/native_control_win.h @@ -1,10 +1,11 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this +// Copyright (c) 2010 The Chromium Authors. All rights reserved. Use of this // source code is governed by a BSD-style license that can be found in the // LICENSE file. #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ #define VIEWS_CONTROLS_NATIVE_CONTROL_WIN_H_ +#include "views/controls/combobox/combobox.h" #include "views/controls/native/native_view_host.h" namespace views { |