Changeset 50339 in webkit
- Timestamp:
- Oct 30, 2009 10:19:40 AM (14 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r50337 r50339 1 2009-10-30 Joanmarie Diggs <joanmarie.diggs@gmail.com> 2 3 Reviewed by Xan Lopez. 4 5 https://bugs.webkit.org/show_bug.cgi?id=25534 6 [GTK] Objects of ROLE_TABLE should implement the accessible table interface 7 8 Second part of the implementation of AtkTable. 9 10 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: 11 (cellAtIndex): 12 (webkit_accessible_table_get_column_at_index): 13 (webkit_accessible_table_get_row_at_index): 14 (webkit_accessible_table_get_caption): 15 (atk_table_interface_init): 16 1 17 2009-10-30 Pavel Feldman <pfeldman@chromium.org> 2 18 -
trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
r50282 r50339 1239 1239 } 1240 1240 1241 static AccessibilityTableCell* cellAtIndex(AtkTable* table, gint index) 1242 { 1243 AccessibilityObject* accTable = core(table); 1244 if (accTable->isAccessibilityRenderObject()) { 1245 AccessibilityObject::AccessibilityChildrenVector allCells; 1246 static_cast<AccessibilityTable*>(accTable)->cells(allCells); 1247 if (0 <= index && static_cast<unsigned>(index) < allCells.size()) { 1248 AccessibilityObject* accCell = allCells.at(index).get(); 1249 return static_cast<AccessibilityTableCell*>(accCell); 1250 } 1251 } 1252 return 0; 1253 } 1254 1241 1255 static AtkObject* webkit_accessible_table_ref_at(AtkTable* table, gint row, gint column) 1242 1256 { … … 1252 1266 AccessibilityTable* AXTable = static_cast<AccessibilityTable*>(core(table)); 1253 1267 return cellIndex(AXCell, AXTable); 1268 } 1269 1270 static gint webkit_accessible_table_get_column_at_index(AtkTable* table, gint index) 1271 { 1272 AccessibilityTableCell* axCell = cellAtIndex(table, index); 1273 if (axCell){ 1274 pair<int, int> columnRange; 1275 axCell->columnIndexRange(columnRange); 1276 return columnRange.first; 1277 } 1278 return -1; 1279 } 1280 1281 static gint webkit_accessible_table_get_row_at_index(AtkTable* table, gint index) 1282 { 1283 AccessibilityTableCell* axCell = cellAtIndex(table, index); 1284 if (axCell){ 1285 pair<int, int> rowRange; 1286 axCell->rowIndexRange(rowRange); 1287 return rowRange.first; 1288 } 1289 return -1; 1254 1290 } 1255 1291 … … 1309 1345 } 1310 1346 1347 static AtkObject* webkit_accessible_table_get_caption(AtkTable* table) 1348 { 1349 AccessibilityObject* accTable = core(table); 1350 if (accTable->isAccessibilityRenderObject()) { 1351 Node* node = static_cast<AccessibilityRenderObject*>(accTable)->renderer()->node(); 1352 if (node && node->hasTagName(HTMLNames::tableTag)) { 1353 HTMLTableCaptionElement* caption = static_cast<HTMLTableElement*>(node)->caption(); 1354 if (caption) 1355 return AccessibilityObject::firstAccessibleObjectFromNode(caption->renderer()->node())->wrapper(); 1356 } 1357 } 1358 return 0; 1359 } 1360 1311 1361 static void atk_table_interface_init(AtkTableIface* iface) 1312 1362 { 1313 1363 iface->ref_at = webkit_accessible_table_ref_at; 1314 1364 iface->get_index_at = webkit_accessible_table_get_index_at; 1365 iface->get_column_at_index = webkit_accessible_table_get_column_at_index; 1366 iface->get_row_at_index = webkit_accessible_table_get_row_at_index; 1315 1367 iface->get_n_columns = webkit_accessible_table_get_n_columns; 1316 1368 iface->get_n_rows = webkit_accessible_table_get_n_rows; … … 1318 1370 iface->get_row_extent_at = webkit_accessible_table_get_row_extent_at; 1319 1371 iface->get_row_header = webkit_accessible_table_get_row_header; 1372 iface->get_caption = webkit_accessible_table_get_caption; 1320 1373 } 1321 1374
Note: See TracChangeset
for help on using the changeset viewer.