OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 return m_columns.size(); | 449 return m_columns.size(); |
450 } | 450 } |
451 | 451 |
452 unsigned AXTable::rowCount() | 452 unsigned AXTable::rowCount() |
453 { | 453 { |
454 updateChildrenIfNecessary(); | 454 updateChildrenIfNecessary(); |
455 | 455 |
456 return m_rows.size(); | 456 return m_rows.size(); |
457 } | 457 } |
458 | 458 |
459 int AXTable::tableLevel() const | |
460 { | |
461 int level = 0; | |
462 for (AXObject* obj = static_cast<AXObject*>(const_cast<AXTable*>(this)); obj
; obj = obj->parentObject()) { | |
463 if (obj->isAXTable()) | |
464 ++level; | |
465 } | |
466 | |
467 return level; | |
468 } | |
469 | |
470 AXTableCell* AXTable::cellForColumnAndRow(unsigned column, unsigned row) | 459 AXTableCell* AXTable::cellForColumnAndRow(unsigned column, unsigned row) |
471 { | 460 { |
472 updateChildrenIfNecessary(); | 461 updateChildrenIfNecessary(); |
473 if (column >= columnCount() || row >= rowCount()) | 462 if (column >= columnCount() || row >= rowCount()) |
474 return 0; | 463 return 0; |
475 | 464 |
476 // Iterate backwards through the rows in case the desired cell has a rowspan
and exists in a previous row. | 465 // Iterate backwards through the rows in case the desired cell has a rowspan
and exists in a previous row. |
477 for (unsigned rowIndexCounter = row + 1; rowIndexCounter > 0; --rowIndexCoun
ter) { | 466 for (unsigned rowIndexCounter = row + 1; rowIndexCounter > 0; --rowIndexCoun
ter) { |
478 unsigned rowIndex = rowIndexCounter - 1; | 467 unsigned rowIndex = rowIndexCounter - 1; |
479 AccessibilityChildrenVector children = m_rows[rowIndex]->children(); | 468 AccessibilityChildrenVector children = m_rows[rowIndex]->children(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 } | 530 } |
542 | 531 |
543 // try the standard | 532 // try the standard |
544 if (title.isEmpty()) | 533 if (title.isEmpty()) |
545 title = AXRenderObject::title(); | 534 title = AXRenderObject::title(); |
546 | 535 |
547 return title; | 536 return title; |
548 } | 537 } |
549 | 538 |
550 } // namespace WebCore | 539 } // namespace WebCore |
OLD | NEW |