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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <atlbase.h> 5 #include <atlbase.h>
6 #include <atlcom.h> 6 #include <atlcom.h>
7 #include <limits.h> 7 #include <limits.h>
8 #include <oleacc.h> 8 #include <oleacc.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return S_FALSE; 273 return S_FALSE;
274 274
275 return S_OK; 275 return S_OK;
276 } 276 }
277 277
278 STDMETHODIMP AXPlatformNodeWin::accNavigate( 278 STDMETHODIMP AXPlatformNodeWin::accNavigate(
279 LONG nav_dir, VARIANT start, VARIANT* end) { 279 LONG nav_dir, VARIANT start, VARIANT* end) {
280 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(start, end); 280 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(start, end);
281 IAccessible* result = nullptr; 281 IAccessible* result = nullptr;
282 282
283 if ((nav_dir == NAVDIR_LASTCHILD || nav_dir == NAVDIR_FIRSTCHILD) &&
284 start.lVal != CHILDID_SELF) {
285 // MSAA states that navigating to first/last child can only be from self.
286 return E_INVALIDARG;
287 }
288
283 switch (nav_dir) { 289 switch (nav_dir) {
284 case NAVDIR_DOWN: 290 case NAVDIR_DOWN:
285 case NAVDIR_UP: 291 case NAVDIR_UP:
286 case NAVDIR_LEFT: 292 case NAVDIR_LEFT:
287 case NAVDIR_RIGHT: 293 case NAVDIR_RIGHT:
288 // These directions are not implemented, matching Mozilla and IE. 294 // These directions are not implemented, matching Mozilla and IE.
289 return E_NOTIMPL; 295 return E_NOTIMPL;
290 296
291 case NAVDIR_FIRSTCHILD: 297 case NAVDIR_FIRSTCHILD:
292 if (delegate_->GetChildCount() > 0) 298 if (delegate_->GetChildCount() > 0)
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 ui::TextBoundaryDirection direction) { 1200 ui::TextBoundaryDirection direction) {
1195 HandleSpecialTextOffset(&start_offset); 1201 HandleSpecialTextOffset(&start_offset);
1196 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1202 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1197 std::vector<int32_t> line_breaks; 1203 std::vector<int32_t> line_breaks;
1198 return static_cast<LONG>(ui::FindAccessibleTextBoundary( 1204 return static_cast<LONG>(ui::FindAccessibleTextBoundary(
1199 text, line_breaks, boundary, start_offset, direction, 1205 text, line_breaks, boundary, start_offset, direction,
1200 AX_TEXT_AFFINITY_DOWNSTREAM)); 1206 AX_TEXT_AFFINITY_DOWNSTREAM));
1201 } 1207 }
1202 1208
1203 } // namespace ui 1209 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698