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

Unified Diff: ui/accessibility/platform/ax_platform_node_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
Index: ui/accessibility/platform/ax_platform_node_win.cc
diff --git a/ui/accessibility/platform/ax_platform_node_win.cc b/ui/accessibility/platform/ax_platform_node_win.cc
index c35356135374000f9e009cf637f1b8c4e12bb47f..9a3619ed7ff31aaba10d3a29579dffd7efb776fc 100644
--- a/ui/accessibility/platform/ax_platform_node_win.cc
+++ b/ui/accessibility/platform/ax_platform_node_win.cc
@@ -280,6 +280,12 @@ STDMETHODIMP AXPlatformNodeWin::accNavigate(
COM_OBJECT_VALIDATE_VAR_ID_1_ARG(start, end);
IAccessible* result = nullptr;
+ 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;
+ }
+
switch (nav_dir) {
case NAVDIR_DOWN:
case NAVDIR_UP:

Powered by Google App Engine
This is Rietveld 408576698