Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1664)

Unified Diff: chrome/browser/browser_accessibility.cc

Issue 118206: Fixes an issue where the MSAA information was not reported back correctly to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/browser_accessibility.h ('k') | chrome/browser/browser_accessibility_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browser_accessibility.cc
===================================================================
--- chrome/browser/browser_accessibility.cc (revision 17645)
+++ chrome/browser/browser_accessibility.cc (working copy)
@@ -11,7 +11,9 @@
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 @@
// 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 @@
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 @@
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 @@
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_);
}
« no previous file with comments | « chrome/browser/browser_accessibility.h ('k') | chrome/browser/browser_accessibility_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698