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 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 | 1374 |
1375 STDMETHODIMP AXPlatformNodeWin::get_columnHeaderCells( | 1375 STDMETHODIMP AXPlatformNodeWin::get_columnHeaderCells( |
1376 IUnknown*** cell_accessibles, | 1376 IUnknown*** cell_accessibles, |
1377 long* n_column_header_cells) { | 1377 long* n_column_header_cells) { |
1378 if (!cell_accessibles || !n_column_header_cells) | 1378 if (!cell_accessibles || !n_column_header_cells) |
1379 return E_INVALIDARG; | 1379 return E_INVALIDARG; |
1380 | 1380 |
1381 *n_column_header_cells = 0; | 1381 *n_column_header_cells = 0; |
1382 auto* table = GetTable(); | 1382 auto* table = GetTable(); |
1383 if (!table) { | 1383 if (!table) { |
1384 NOTREACHED(); | |
1385 return S_FALSE; | 1384 return S_FALSE; |
1386 } | 1385 } |
1387 | 1386 |
1388 int column = GetTableColumn(); | 1387 int column = GetTableColumn(); |
1389 int columns = GetTableColumnCount(); | 1388 int columns = GetTableColumnCount(); |
1390 int rows = GetTableRowCount(); | 1389 int rows = GetTableRowCount(); |
1391 if (columns <= 0 || rows <= 0 || column < 0 || column >= columns) | 1390 if (columns <= 0 || rows <= 0 || column < 0 || column >= columns) |
1392 return S_FALSE; | 1391 return S_FALSE; |
1393 | 1392 |
1394 for (int i = 0; i < rows; ++i) { | 1393 for (int i = 0; i < rows; ++i) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1431 } | 1430 } |
1432 | 1431 |
1433 STDMETHODIMP AXPlatformNodeWin::get_rowHeaderCells(IUnknown*** cell_accessibles, | 1432 STDMETHODIMP AXPlatformNodeWin::get_rowHeaderCells(IUnknown*** cell_accessibles, |
1434 long* n_row_header_cells) { | 1433 long* n_row_header_cells) { |
1435 if (!cell_accessibles || !n_row_header_cells) | 1434 if (!cell_accessibles || !n_row_header_cells) |
1436 return E_INVALIDARG; | 1435 return E_INVALIDARG; |
1437 | 1436 |
1438 *n_row_header_cells = 0; | 1437 *n_row_header_cells = 0; |
1439 auto* table = GetTable(); | 1438 auto* table = GetTable(); |
1440 if (!table) { | 1439 if (!table) { |
1441 NOTREACHED(); | |
1442 return S_FALSE; | 1440 return S_FALSE; |
1443 } | 1441 } |
1444 | 1442 |
1445 int row = GetTableRow(); | 1443 int row = GetTableRow(); |
1446 int columns = GetTableColumnCount(); | 1444 int columns = GetTableColumnCount(); |
1447 int rows = GetTableRowCount(); | 1445 int rows = GetTableRowCount(); |
1448 if (columns <= 0 || rows <= 0 || row < 0 || row >= rows) | 1446 if (columns <= 0 || rows <= 0 || row < 0 || row >= rows) |
1449 return S_FALSE; | 1447 return S_FALSE; |
1450 | 1448 |
1451 for (int i = 0; i < columns; ++i) { | 1449 for (int i = 0; i < columns; ++i) { |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2762 if (container && container->GetData().role == ui::AX_ROLE_GROUP) | 2760 if (container && container->GetData().role == ui::AX_ROLE_GROUP) |
2763 container = FromNativeViewAccessible(container->GetParent()); | 2761 container = FromNativeViewAccessible(container->GetParent()); |
2764 | 2762 |
2765 if (!container) | 2763 if (!container) |
2766 return false; | 2764 return false; |
2767 | 2765 |
2768 return container->GetData().role == ui::AX_ROLE_TREE_GRID; | 2766 return container->GetData().role == ui::AX_ROLE_TREE_GRID; |
2769 } | 2767 } |
2770 | 2768 |
2771 } // namespace ui | 2769 } // namespace ui |
OLD | NEW |