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

Side by Side Diff: ui/accessibility/platform/ax_platform_node_win.cc

Issue 2341633006: MacViews/a11y: Allow accessibility clients to update the selected text. (Closed)
Patch Set: Rebase. Created 4 years, 1 month 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 447 }
448 448
449 STDMETHODIMP AXPlatformNodeWin::get_accValue(VARIANT var_id, BSTR* value) { 449 STDMETHODIMP AXPlatformNodeWin::get_accValue(VARIANT var_id, BSTR* value) {
450 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, value); 450 COM_OBJECT_VALIDATE_VAR_ID_1_ARG(var_id, value);
451 return GetStringAttributeAsBstr(ui::AX_ATTR_VALUE, value); 451 return GetStringAttributeAsBstr(ui::AX_ATTR_VALUE, value);
452 } 452 }
453 453
454 STDMETHODIMP AXPlatformNodeWin::put_accValue(VARIANT var_id, 454 STDMETHODIMP AXPlatformNodeWin::put_accValue(VARIANT var_id,
455 BSTR new_value) { 455 BSTR new_value) {
456 COM_OBJECT_VALIDATE_VAR_ID(var_id); 456 COM_OBJECT_VALIDATE_VAR_ID(var_id);
457 if (delegate_->SetStringValue(new_value)) 457 if (delegate_->SetStringValue(new_value, false))
tapted 2016/10/27 02:09:56 should this be 'true' to preserve existing behavio
Patti Lor 2016/10/31 00:35:05 Yes, thank you! Fixed now.
458 return S_OK; 458 return S_OK;
459 return E_FAIL; 459 return E_FAIL;
460 } 460 }
461 461
462 // IAccessible functions not supported. 462 // IAccessible functions not supported.
463 463
464 STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) { 464 STDMETHODIMP AXPlatformNodeWin::get_accSelection(VARIANT* selected) {
465 COM_OBJECT_VALIDATE_1_ARG(selected); 465 COM_OBJECT_VALIDATE_1_ARG(selected);
466 if (selected) 466 if (selected)
467 selected->vt = VT_EMPTY; 467 selected->vt = VT_EMPTY;
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 ui::TextBoundaryDirection direction) { 1147 ui::TextBoundaryDirection direction) {
1148 HandleSpecialTextOffset(text, &start_offset); 1148 HandleSpecialTextOffset(text, &start_offset);
1149 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1149 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1150 std::vector<int32_t> line_breaks; 1150 std::vector<int32_t> line_breaks;
1151 return static_cast<LONG>(ui::FindAccessibleTextBoundary( 1151 return static_cast<LONG>(ui::FindAccessibleTextBoundary(
1152 text, line_breaks, boundary, start_offset, direction, 1152 text, line_breaks, boundary, start_offset, direction,
1153 AX_TEXT_AFFINITY_DOWNSTREAM)); 1153 AX_TEXT_AFFINITY_DOWNSTREAM));
1154 } 1154 }
1155 1155
1156 } // namespace ui 1156 } // namespace ui
OLDNEW
« no previous file with comments | « ui/accessibility/platform/ax_platform_node_mac.mm ('k') | ui/accessibility/platform/test_ax_node_wrapper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698