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

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

Issue 2877313003: Fixed IAccessible::accNavigate for NAVDIR_NEXT and NAVDIR_PREVIOUS when start object was a simple c… (Closed)
Patch Set: Fixed comment. Created 3 years, 7 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_com_win.cc
diff --git a/content/browser/accessibility/browser_accessibility_com_win.cc b/content/browser/accessibility/browser_accessibility_com_win.cc
index ef242b933711c44f2fb5b205e18713b48bf0523c..17ff9a29529348f65f1bd3406c917805b88e060d 100644
--- a/content/browser/accessibility/browser_accessibility_com_win.cc
+++ b/content/browser/accessibility/browser_accessibility_com_win.cc
@@ -499,17 +499,25 @@ STDMETHODIMP BrowserAccessibilityComWin::accNavigate(LONG nav_dir,
if (!owner())
return E_FAIL;
- // Forward all directions but NAVDIR_ to the platform node implementation.
+ // Forward all non-spatial directions (e.g. NAVDIR_NEXT) to the platform node
+ // implementation.
if (nav_dir != NAVDIR_DOWN && nav_dir != NAVDIR_UP &&
nav_dir != NAVDIR_LEFT && nav_dir != NAVDIR_RIGHT) {
return AXPlatformNodeWin::accNavigate(nav_dir, start, end);
}
+ if (end) {
+ end->vt = VT_EMPTY;
+ } else {
+ return E_INVALIDARG;
+ }
+
BrowserAccessibilityComWin* target = GetTargetFromChildID(start);
if (!target)
return E_INVALIDARG;
BrowserAccessibility* result = nullptr;
+ // Only handle spatial directions for tables here.
switch (nav_dir) {
case NAVDIR_DOWN:
result = target->owner()->GetTableCell(
@@ -531,10 +539,8 @@ STDMETHODIMP BrowserAccessibilityComWin::accNavigate(LONG nav_dir,
break;
}
- if (!result) {
- end->vt = VT_EMPTY;
+ if (!result)
return S_FALSE;
- }
end->vt = VT_DISPATCH;
end->pdispVal = ToBrowserAccessibilityComWin(result)->NewReference();
« 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