| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 child->vt = VT_DISPATCH; | 246 child->vt = VT_DISPATCH; |
| 247 child->pdispVal = hit_child; | 247 child->pdispVal = hit_child; |
| 248 // Always increment ref when returning a reference to a COM object. | 248 // Always increment ref when returning a reference to a COM object. |
| 249 child->pdispVal->AddRef(); | 249 child->pdispVal->AddRef(); |
| 250 } | 250 } |
| 251 return result; | 251 return result; |
| 252 } | 252 } |
| 253 | 253 |
| 254 HRESULT AXPlatformNodeWin::accDoDefaultAction(VARIANT var_id) { | 254 HRESULT AXPlatformNodeWin::accDoDefaultAction(VARIANT var_id) { |
| 255 COM_OBJECT_VALIDATE_VAR_ID(var_id); | 255 COM_OBJECT_VALIDATE_VAR_ID(var_id); |
| 256 delegate_->DoDefaultAction(); | 256 AXActionData data; |
| 257 return S_OK; | 257 data.action = ui::AX_ACTION_DO_DEFAULT; |
| 258 if (delegate_->AccessibilityPerformAction(data)) |
| 259 return S_OK; |
| 260 return E_FAIL; |
| 258 } | 261 } |
| 259 | 262 |
| 260 STDMETHODIMP AXPlatformNodeWin::accLocation( | 263 STDMETHODIMP AXPlatformNodeWin::accLocation( |
| 261 LONG* x_left, LONG* y_top, LONG* width, LONG* height, VARIANT var_id) { | 264 LONG* x_left, LONG* y_top, LONG* width, LONG* height, VARIANT var_id) { |
| 262 COM_OBJECT_VALIDATE_VAR_ID_4_ARGS(var_id, x_left, y_top, width, height); | 265 COM_OBJECT_VALIDATE_VAR_ID_4_ARGS(var_id, x_left, y_top, width, height); |
| 263 gfx::Rect bounds = gfx::ToEnclosingRect(GetData().location); | 266 gfx::Rect bounds = gfx::ToEnclosingRect(GetData().location); |
| 264 bounds += delegate_->GetGlobalCoordinateOffset(); | 267 bounds += delegate_->GetGlobalCoordinateOffset(); |
| 265 *x_left = bounds.x(); | 268 *x_left = bounds.x(); |
| 266 *y_top = bounds.y(); | 269 *y_top = bounds.y(); |
| 267 *width = bounds.width(); | 270 *width = bounds.width(); |
| (...skipping 924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1192 ui::TextBoundaryDirection direction) { | 1195 ui::TextBoundaryDirection direction) { |
| 1193 HandleSpecialTextOffset(&start_offset); | 1196 HandleSpecialTextOffset(&start_offset); |
| 1194 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); | 1197 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); |
| 1195 std::vector<int32_t> line_breaks; | 1198 std::vector<int32_t> line_breaks; |
| 1196 return static_cast<LONG>(ui::FindAccessibleTextBoundary( | 1199 return static_cast<LONG>(ui::FindAccessibleTextBoundary( |
| 1197 text, line_breaks, boundary, start_offset, direction, | 1200 text, line_breaks, boundary, start_offset, direction, |
| 1198 AX_TEXT_AFFINITY_DOWNSTREAM)); | 1201 AX_TEXT_AFFINITY_DOWNSTREAM)); |
| 1199 } | 1202 } |
| 1200 | 1203 |
| 1201 } // namespace ui | 1204 } // namespace ui |
| OLD | NEW |