diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-16 22:12:47 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-16 22:12:47 +0000 |
commit | 1f42969aab0e25754545e9e7be3aa0044f76a162 (patch) | |
tree | 408e894539c5c997b34f389ecd05482c026fd084 /views | |
parent | a6decd19be6da302b1ed193a73183dc866b6d180 (diff) | |
download | chromium_src-1f42969aab0e25754545e9e7be3aa0044f76a162.zip chromium_src-1f42969aab0e25754545e9e7be3aa0044f76a162.tar.gz chromium_src-1f42969aab0e25754545e9e7be3aa0044f76a162.tar.bz2 |
Ensure that accessibility information from native views like the autocomplete edit are returned correctly
to accessibility clients like screen readers.
We achieve this by sending off the WM_GETOBJECT message to the underlying native view HWND if the current
view cannot return accessibility information for its children.
Fixes portions of http://code.google.com/p/chromium/issues/detail?id=13291
Bug=13291
Review URL: http://codereview.chromium.org/287007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29338 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/accessibility/view_accessibility.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/views/accessibility/view_accessibility.cc b/views/accessibility/view_accessibility.cc index 0b8f4af..f74ae9c 100644 --- a/views/accessibility/view_accessibility.cc +++ b/views/accessibility/view_accessibility.cc @@ -774,12 +774,15 @@ HRESULT ViewAccessibility::GetNativeIAccessibleInterface( return E_INVALIDARG; } - HWND render_view_window = + HWND native_view_window = static_cast<HWND>(GetProp(native_host->native_view(), kViewsNativeHostPropForAccessibility)); + if (!IsWindow(native_view_window)) { + native_view_window = native_host->native_view(); + } - if (IsWindow(render_view_window)) { - LRESULT ret = SendMessage(render_view_window, WM_GETOBJECT, 0, + if (IsWindow(native_view_window)) { + LRESULT ret = SendMessage(native_view_window, WM_GETOBJECT, 0, OBJID_CLIENT); return ObjectFromLresult(ret, IID_IDispatch, 0, reinterpret_cast<void**>(disp_child)); |