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

Unified Diff: content/browser/accessibility/browser_accessibility_win.cc

Issue 25943003: Support accessible inline text boxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests, implement support for IsLeaf everywhere Created 7 years, 2 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
Index: content/browser/accessibility/browser_accessibility_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index df3263e845ddfb2cc82fe58cb5ce1b117d08bcda..9dc644c9423bd8d2eab80b8a9654343859b7af6a 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -358,7 +358,11 @@ STDMETHODIMP BrowserAccessibilityWin::get_accChildCount(LONG* child_count) {
if (!child_count)
return E_INVALIDARG;
- *child_count = children_.size();
+ if (IsLeaf())
+ *child_count = 0;
+ else
+ *child_count = children_.size();
+
return S_OK;
}
@@ -2618,7 +2622,7 @@ STDMETHODIMP BrowserAccessibilityWin::get_childAt(
if (!node)
return E_INVALIDARG;
- if (child_index < children_.size()) {
+ if (IsLeaf() || child_index < children_.size()) {
David Tseng 2013/10/23 16:42:46 I'm confused by this indexing logic; child_index
dmazzoni 2013/10/30 16:45:26 Ack! Yes, you found a longstanding bug. We never c
*node = NULL;
return S_FALSE;
}

Powered by Google App Engine
This is Rietveld 408576698