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

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

Issue 2806963002: Implement BrowserAccessibility accNavigate() in terms of AXPlatformNodeWin. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | ui/accessibility/platform/ax_platform_node_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d4a8d1fa4c3d11eaf568b897239c305326c4c4c1..87ae27f257e71819e8db89a87f66b70b16191302 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -495,13 +495,12 @@ STDMETHODIMP BrowserAccessibilityWin::accNavigate(LONG nav_dir,
if (!target)
return E_INVALIDARG;
- if ((nav_dir == NAVDIR_LASTCHILD || nav_dir == NAVDIR_FIRSTCHILD) &&
- start.lVal != CHILDID_SELF) {
- // MSAA states that navigating to first/last child can only be from self.
- return E_INVALIDARG;
+ // Forward all directions but NAVDIR_ to the platform node implementation.
+ if (nav_dir != NAVDIR_DOWN && nav_dir != NAVDIR_UP &&
+ nav_dir != NAVDIR_LEFT && nav_dir != NAVDIR_RIGHT) {
+ return target->GetPlatformNodeWin()->accNavigate(nav_dir, start, end);
}
- uint32_t child_count = target->PlatformChildCount();
BrowserAccessibility* result = nullptr;
switch (nav_dir) {
case NAVDIR_DOWN:
@@ -518,20 +517,6 @@ STDMETHODIMP BrowserAccessibilityWin::accNavigate(LONG nav_dir,
result = target->GetTableCell(GetTableRow(),
GetTableColumn() + GetTableColumnSpan());
break;
- case NAVDIR_FIRSTCHILD:
- if (child_count > 0)
- result = target->PlatformGetChild(0);
- break;
- case NAVDIR_LASTCHILD:
- if (child_count > 0)
- result = target->PlatformGetChild(child_count - 1);
- break;
- case NAVDIR_NEXT:
- result = target->GetNextSibling();
- break;
- case NAVDIR_PREVIOUS:
- result = target->GetPreviousSibling();
- break;
}
if (!result) {
« no previous file with comments | « no previous file | ui/accessibility/platform/ax_platform_node_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698