| OLD | NEW |
| 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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 } | 504 } |
| 505 | 505 |
| 506 STDMETHODIMP AXPlatformNodeWin::get_states(AccessibleStates* states) { | 506 STDMETHODIMP AXPlatformNodeWin::get_states(AccessibleStates* states) { |
| 507 COM_OBJECT_VALIDATE_1_ARG(states); | 507 COM_OBJECT_VALIDATE_1_ARG(states); |
| 508 // There are only a couple of states we need to support | 508 // There are only a couple of states we need to support |
| 509 // in IAccessible2. If any more are added, we may want to | 509 // in IAccessible2. If any more are added, we may want to |
| 510 // add a helper function like MSAAState. | 510 // add a helper function like MSAAState. |
| 511 *states = IA2_STATE_OPAQUE; | 511 *states = IA2_STATE_OPAQUE; |
| 512 if (GetData().state & (1 << ui::AX_STATE_EDITABLE)) | 512 if (GetData().state & (1 << ui::AX_STATE_EDITABLE)) |
| 513 *states |= IA2_STATE_EDITABLE; | 513 *states |= IA2_STATE_EDITABLE; |
| 514 if (GetData().state & (1 << ui::AX_STATE_VERTICAL)) |
| 515 *states |= IA2_STATE_VERTICAL; |
| 514 | 516 |
| 515 return S_OK; | 517 return S_OK; |
| 516 } | 518 } |
| 517 | 519 |
| 518 STDMETHODIMP AXPlatformNodeWin::get_uniqueID(LONG* unique_id) { | 520 STDMETHODIMP AXPlatformNodeWin::get_uniqueID(LONG* unique_id) { |
| 519 COM_OBJECT_VALIDATE_1_ARG(unique_id); | 521 COM_OBJECT_VALIDATE_1_ARG(unique_id); |
| 520 *unique_id = -unique_id_; | 522 *unique_id = -unique_id_; |
| 521 return S_OK; | 523 return S_OK; |
| 522 } | 524 } |
| 523 | 525 |
| (...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1144 ui::TextBoundaryDirection direction) { | 1146 ui::TextBoundaryDirection direction) { |
| 1145 HandleSpecialTextOffset(text, &start_offset); | 1147 HandleSpecialTextOffset(text, &start_offset); |
| 1146 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); | 1148 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); |
| 1147 std::vector<int32_t> line_breaks; | 1149 std::vector<int32_t> line_breaks; |
| 1148 return static_cast<LONG>(ui::FindAccessibleTextBoundary( | 1150 return static_cast<LONG>(ui::FindAccessibleTextBoundary( |
| 1149 text, line_breaks, boundary, start_offset, direction, | 1151 text, line_breaks, boundary, start_offset, direction, |
| 1150 AX_TEXT_AFFINITY_DOWNSTREAM)); | 1152 AX_TEXT_AFFINITY_DOWNSTREAM)); |
| 1151 } | 1153 } |
| 1152 | 1154 |
| 1153 } // namespace ui | 1155 } // namespace ui |
| OLD | NEW |