summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorklink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 21:56:48 +0000
committerklink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-05 21:56:48 +0000
commit27937bdc5b5199c82784c90fb2af4746a7054895 (patch)
tree9e36ec7cd0bfc2996b87cfa6928bce0d783202c9 /webkit
parent25b3433897bab5e94dac9ab8a2f09b356792ab7d (diff)
downloadchromium_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 'webkit')
-rw-r--r--webkit/glue/webaccessibility.h4
-rw-r--r--webkit/glue/webaccessibilitymanager_impl.cc9
-rw-r--r--webkit/glue/webaccessibilitymanager_impl.h3
3 files changed, 9 insertions, 7 deletions
diff --git a/webkit/glue/webaccessibility.h b/webkit/glue/webaccessibility.h
index 250c665..538e612 100644
--- a/webkit/glue/webaccessibility.h
+++ b/webkit/glue/webaccessibility.h
@@ -117,10 +117,6 @@ class WebAccessibility {
// Id of accessible child, whose information is being requested.
int child_id;
- // Indicates if the |child_id| refers to a direct child of the active
- // accessibility object (true) or not (false).
- bool direct_descendant;
-
// LONG input parameters, used differently depending on the function called.
long input_long1;
long input_long2;
diff --git a/webkit/glue/webaccessibilitymanager_impl.cc b/webkit/glue/webaccessibilitymanager_impl.cc
index f765127..382c6057a 100644
--- a/webkit/glue/webaccessibilitymanager_impl.cc
+++ b/webkit/glue/webaccessibilitymanager_impl.cc
@@ -35,7 +35,7 @@ WebAccessibilityManager* WebAccessibilityManager::Create() {
// class WebAccessibilityManagerImpl
WebAccessibilityManagerImpl::WebAccessibilityManagerImpl()
: root_(new GlueAccessibilityObjectRoot),
- acc_obj_id_(0) {
+ acc_obj_id_(1000) {
}
WebAccessibilityManagerImpl::~WebAccessibilityManagerImpl() {
@@ -55,7 +55,10 @@ bool WebAccessibilityManagerImpl::GetAccObjInfo(WebView* view,
int object_id = in_params.object_id;
int child_id = in_params.child_id;
- if (!in_params.direct_descendant) {
+ // Since ids assigned by Chrome starts at 1000, whereas platform-specific ids
+ // used to reference a child will be in a wholly different range, we know
+ // that any id that high should be treated as a non-direct descendant.
+ if (in_params.child_id >= 1000) {
// Object is not a direct child, re-map the input parameters accordingly.
// The object to be retrieved is referred to by the |in_params.child_id|, as
// a result of e.g. a focus event. The local |child_id| is set to 0, to
@@ -247,7 +250,7 @@ bool WebAccessibilityManagerImpl::ClearAccObjMap(int acc_obj_id,
}
int_to_glue_acc_obj_map_.erase(it);
- if (acc_obj_id == 0) {
+ if (acc_obj_id == 1000) {
// Invalidate root.
root_->acc_obj_root_ = 0;
}
diff --git a/webkit/glue/webaccessibilitymanager_impl.h b/webkit/glue/webaccessibilitymanager_impl.h
index 1bc0607..be14bec 100644
--- a/webkit/glue/webaccessibilitymanager_impl.h
+++ b/webkit/glue/webaccessibilitymanager_impl.h
@@ -35,6 +35,9 @@ class WebAccessibilityManagerImpl : public WebAccessibilityManager {
// Needed so WebAccessibilityManager::Create can call our constructor.
friend class WebAccessibilityManager;
+ // Constructor creates a new GlueAccessibilityObjectRoot, and initializes
+ // the root |acc_obj_id_| to 1000, to avoid conflicts with platform-specific
+ // child ids.
WebAccessibilityManagerImpl();
~WebAccessibilityManagerImpl();