diff options
author | klink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 21:56:48 +0000 |
---|---|---|
committer | klink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 21:56:48 +0000 |
commit | 27937bdc5b5199c82784c90fb2af4746a7054895 (patch) | |
tree | 9e36ec7cd0bfc2996b87cfa6928bce0d783202c9 /chrome/browser/browser_accessibility.cc | |
parent | 25b3433897bab5e94dac9ab8a2f09b356792ab7d (diff) | |
download | chromium_src-27937bdc5b5199c82784c90fb2af4746a7054895.zip chromium_src-27937bdc5b5199c82784c90fb2af4746a7054895.tar.gz chromium_src-27937bdc5b5199c82784c90fb2af4746a7054895.tar.bz2 |
Fixes an issue where the MSAA information was not reported back correctly to the AT, upon the HWND containing the web content first receiving focus. Note that this is not a full fix for the bug below, but one more piece to resolving it.BUG=13291TEST=none
Review URL: http://codereview.chromium.org/118206
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_accessibility.cc')
-rw-r--r-- | chrome/browser/browser_accessibility.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/chrome/browser/browser_accessibility.cc b/chrome/browser/browser_accessibility.cc index 9fade8d..8af5a6a 100644 --- a/chrome/browser/browser_accessibility.cc +++ b/chrome/browser/browser_accessibility.cc @@ -11,7 +11,9 @@ using webkit_glue::WebAccessibility; HRESULT BrowserAccessibility::Initialize(int iaccessible_id, int routing_id, int process_id, HWND parent_hwnd) { - if (!parent_hwnd || iaccessible_id < 0) + // Check input parameters. Root id is 1000, to avoid conflicts with the ids + // used by MSAA. + if (!parent_hwnd || iaccessible_id < 1000) return E_INVALIDARG; iaccessible_id_ = iaccessible_id; @@ -21,10 +23,6 @@ HRESULT BrowserAccessibility::Initialize(int iaccessible_id, int routing_id, // Mark instance as active. instance_active_ = true; - - // Treat child ids intitially as referring to direct children of the object. - direct_descendant_ = true; - return S_OK; } @@ -192,7 +190,7 @@ STDMETHODIMP BrowserAccessibility::get_accChild(VARIANT var_child, return E_INVALIDARG; // If var_child is the parent, remain with the same IDispatch. - if (var_child.lVal == CHILDID_SELF && iaccessible_id_ != 0) + if (var_child.lVal == CHILDID_SELF && iaccessible_id_ != 1000) return S_OK; if (!RequestAccessibilityInfo(WebAccessibility::FUNCTION_GETCHILD, var_child, @@ -411,7 +409,7 @@ STDMETHODIMP BrowserAccessibility::get_accParent(IDispatch** disp_parent) { return E_INVALIDARG; // Root node's parent is the containing HWND's IAccessible. - if (iaccessible_id_ == 0) { + if (iaccessible_id_ == 1000) { // For an object that has no parent (e.g. root), point the accessible parent // to the default implementation. HRESULT hr = @@ -548,13 +546,9 @@ bool BrowserAccessibility::RequestAccessibilityInfo(int iaccessible_func_id, in_params.object_id = iaccessible_id_; in_params.function_id = iaccessible_func_id; in_params.child_id = var_id.lVal; - in_params.direct_descendant = direct_descendant(); in_params.input_long1 = input1; in_params.input_long2 = input2; - if (!direct_descendant()) - set_direct_descendant(true); - return BrowserAccessibilityManager::GetInstance()-> RequestAccessibilityInfo(&in_params, routing_id_, process_id_); } |