diff options
author | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-08 19:26:24 +0000 |
---|---|---|
committer | dmazzoni@chromium.org <dmazzoni@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-08 19:26:24 +0000 |
commit | 8368e3c097978a1424e13786efceead3ffc6c385 (patch) | |
tree | 388a0a7d01f15a992a097ec92bad7727f17a9f92 /webkit/glue/webaccessibility.h | |
parent | f74252d3754d1d58b6f97cb3cd89b47d151cd88d (diff) | |
download | chromium_src-8368e3c097978a1424e13786efceead3ffc6c385.zip chromium_src-8368e3c097978a1424e13786efceead3ffc6c385.tar.gz chromium_src-8368e3c097978a1424e13786efceead3ffc6c385.tar.bz2 |
Browser accessibility improvements so that screen readers can access more
complicated webpages without problems.
First, WebAccessibility now works around a "multiple inheritance problem"
in WebCore::AccessibilityObject where the same node appears as a child of
multiple parents. For example, a table cell appears as a child of both a
row and a column. This is solved by having each WebAccessibility parent
check whether the child lists itself as an ancestor. If not, it notes the
child's id only in a separate vector, so each child appears fully only once.
Second, BrowserAccessibility now has internal reference counting, which allows
BrowserAccessibilityManager to update any subtree while maximally reusing
as many objects as possible. This fixes many screen reader interaction
problems!
All of this new functionality is tested with new cross-platform tests.
BUG=67192
BUG=67620
TEST=Adds new unit tests and a browser test.
Review URL: http://codereview.chromium.org/6625042
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77316 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webaccessibility.h')
-rw-r--r-- | webkit/glue/webaccessibility.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/webkit/glue/webaccessibility.h b/webkit/glue/webaccessibility.h index 081d156..b67ce83 100644 --- a/webkit/glue/webaccessibility.h +++ b/webkit/glue/webaccessibility.h @@ -193,11 +193,15 @@ struct WebAccessibility { ~WebAccessibility(); private: - // Initialize an already-created struct, same as the constructor a + // Initialize an already-created struct, same as the constructor above. void Init(const WebKit::WebAccessibilityObject& src, WebKit::WebAccessibilityCache* cache, bool include_children); + // Returns true if |ancestor| is an ancestor of |child|. + bool IsAncestorOf(const WebKit::WebAccessibilityObject& ancestor, + const WebKit::WebAccessibilityObject& child); + public: // This is a simple serializable struct. All member variables should be // copyable. @@ -209,6 +213,7 @@ struct WebAccessibility { WebKit::WebRect location; std::map<int32, string16> attributes; std::vector<WebAccessibility> children; + std::vector<int32> indirect_child_ids; std::vector<std::pair<string16, string16> > html_attributes; }; |