| 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 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 if (event_type == ui::AX_EVENT_SELECTION && | 174 if (event_type == ui::AX_EVENT_SELECTION && |
| 175 GetData().role == ui::AX_ROLE_MENU_ITEM) | 175 GetData().role == ui::AX_ROLE_MENU_ITEM) |
| 176 event_type = ui::AX_EVENT_FOCUS; | 176 event_type = ui::AX_EVENT_FOCUS; |
| 177 | 177 |
| 178 int native_event = MSAAEvent(event_type); | 178 int native_event = MSAAEvent(event_type); |
| 179 if (native_event < EVENT_MIN) | 179 if (native_event < EVENT_MIN) |
| 180 return; | 180 return; |
| 181 | 181 |
| 182 ::NotifyWinEvent(native_event, hwnd, OBJID_CLIENT, -unique_id_); | 182 ::NotifyWinEvent(native_event, hwnd, OBJID_CLIENT, -unique_id_); |
| 183 | 183 |
| 184 if (event_type == ui::AX_EVENT_TEXT_SELECTION_CHANGED) { |
| 185 // We also need to fire an older MSAA event used by some assistive software. |
| 186 ::NotifyWinEvent(EVENT_OBJECT_LOCATIONCHANGE, hwnd, OBJID_CARET, |
| 187 -unique_id_); |
| 188 } |
| 189 |
| 184 // Keep track of objects that are a target of an alert event. | 190 // Keep track of objects that are a target of an alert event. |
| 185 if (event_type == ui::AX_EVENT_ALERT) | 191 if (event_type == ui::AX_EVENT_ALERT) |
| 186 AddAlertTarget(); | 192 AddAlertTarget(); |
| 187 } | 193 } |
| 188 | 194 |
| 189 int AXPlatformNodeWin::GetIndexInParent() { | 195 int AXPlatformNodeWin::GetIndexInParent() { |
| 190 base::win::ScopedComPtr<IDispatch> parent_dispatch; | 196 base::win::ScopedComPtr<IDispatch> parent_dispatch; |
| 191 base::win::ScopedComPtr<IAccessible> parent_accessible; | 197 base::win::ScopedComPtr<IAccessible> parent_accessible; |
| 192 if (S_OK != get_accParent(parent_dispatch.Receive())) | 198 if (S_OK != get_accParent(parent_dispatch.Receive())) |
| 193 return -1; | 199 return -1; |
| (...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 ui::TextBoundaryDirection direction) { | 1206 ui::TextBoundaryDirection direction) { |
| 1201 HandleSpecialTextOffset(&start_offset); | 1207 HandleSpecialTextOffset(&start_offset); |
| 1202 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); | 1208 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); |
| 1203 std::vector<int32_t> line_breaks; | 1209 std::vector<int32_t> line_breaks; |
| 1204 return static_cast<LONG>(ui::FindAccessibleTextBoundary( | 1210 return static_cast<LONG>(ui::FindAccessibleTextBoundary( |
| 1205 text, line_breaks, boundary, start_offset, direction, | 1211 text, line_breaks, boundary, start_offset, direction, |
| 1206 AX_TEXT_AFFINITY_DOWNSTREAM)); | 1212 AX_TEXT_AFFINITY_DOWNSTREAM)); |
| 1207 } | 1213 } |
| 1208 | 1214 |
| 1209 } // namespace ui | 1215 } // namespace ui |
| OLD | NEW |