diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-10 05:41:23 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-10 05:41:23 +0000 |
commit | a64f3390904e06e4ee06203bcd03055e77dbde12 (patch) | |
tree | 09686f3874743f0e1ee5c6e027f48a31da4d5735 /chrome/browser | |
parent | b5f4cc278286dd1b0f7d9fb98d2c3554de325f0c (diff) | |
download | chromium_src-a64f3390904e06e4ee06203bcd03055e77dbde12.zip chromium_src-a64f3390904e06e4ee06203bcd03055e77dbde12.tar.gz chromium_src-a64f3390904e06e4ee06203bcd03055e77dbde12.tar.bz2 |
Accessibility information from the renderer was not being returned to tools like screen readers, etc.
This was because the object implementing the root IAccessible interface did not know how to navigate
a native render view. To work around this, we now check if the underlying view is a native view in
our root IAccessible::get_accChild function and if yes we send the WM_GETOBJECT message to the
corresponding RenderWidgetHostViewWin class, which returns an IAccessible interface which then can
expose information from the renderer.
The other changes in the accessibility code are for some crashes I observed while testing the
screen readers like nvda, the Windows screen reader which send a flurry of WM_GETOBJECT messages
leading to some race conditions.
We also ensure that the accessibility information for a view is torn down when the view is destroyed.
Fixes portions of http://code.google.com/p/chromium/issues/detail?id=13291
Bug=13291
Review URL: http://codereview.chromium.org/261044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28655 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host_view_win.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host_view_win.cc b/chrome/browser/renderer_host/render_widget_host_view_win.cc index 19b6db3..2ad63e5 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_win.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_win.cc @@ -31,6 +31,7 @@ #include "skia/ext/skia_utils_win.h" #include "webkit/api/public/WebInputEvent.h" #include "webkit/api/public/win/WebInputEventFactory.h" +#include "views/accessibility/view_accessibility.h" #include "views/focus/focus_util_win.h" // Included for views::kReflectedMessage - TODO(beng): move this to win_util.h! #include "views/widget/widget_win.h" @@ -681,6 +682,9 @@ LRESULT RenderWidgetHostViewWin::OnCreate(CREATESTRUCT* create_struct) { // Marks that window as supporting mouse-wheel messages rerouting so it is // scrolled when under the mouse pointer even if inactive. views::SetWindowSupportsRerouteMouseWheel(m_hWnd); + // Save away our HWND in the parent window as a property so that the + // accessibility code can find it. + SetProp(GetParent(), kViewsNativeHostPropForAccessibility, m_hWnd); return 0; } @@ -1249,7 +1253,6 @@ LRESULT RenderWidgetHostViewWin::OnGetObject(UINT message, WPARAM wparam, if (!browser_accessibility_root_) { // No valid root found, return with failure. - NOTREACHED(); return static_cast<LRESULT>(0L); } } |