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 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 | 462 |
463 return m_rows; | 463 return m_rows; |
464 } | 464 } |
465 | 465 |
466 void AXTable::columnHeaders(AccessibilityChildrenVector& headers) | 466 void AXTable::columnHeaders(AccessibilityChildrenVector& headers) |
467 { | 467 { |
468 if (!m_renderer) | 468 if (!m_renderer) |
469 return; | 469 return; |
470 | 470 |
471 updateChildrenIfNecessary(); | 471 updateChildrenIfNecessary(); |
472 | 472 unsigned columnCount = m_columns.size(); |
473 unsigned colCount = m_columns.size(); | 473 for (unsigned c = 0; c < columnCount; c++) |
474 for (unsigned k = 0; k < colCount; ++k) { | 474 toAXTableColumn(m_columns[c].get())->headerObjectsForColumn(headers); |
475 AXObject* header = toAXTableColumn(m_columns[k].get())->headerObject(); | |
476 if (!header) | |
477 continue; | |
478 headers.append(header); | |
479 } | |
480 } | 475 } |
481 | 476 |
482 void AXTable::rowHeaders(AccessibilityChildrenVector& headers) | 477 void AXTable::rowHeaders(AccessibilityChildrenVector& headers) |
483 { | 478 { |
484 if (!m_renderer) | 479 if (!m_renderer) |
485 return; | 480 return; |
486 | 481 |
487 updateChildrenIfNecessary(); | 482 updateChildrenIfNecessary(); |
488 | |
489 unsigned rowCount = m_rows.size(); | 483 unsigned rowCount = m_rows.size(); |
490 for (unsigned r = 0; r < rowCount; r++) { | 484 for (unsigned r = 0; r < rowCount; r++) |
491 if (AXObject* header = toAXTableRow(m_rows[r].get())->headerObject()) | 485 toAXTableRow(m_rows[r].get())->headerObjectsForRow(headers); |
492 headers.append(header); | |
493 } | |
494 } | 486 } |
495 | 487 |
496 void AXTable::cells(AXObject::AccessibilityChildrenVector& cells) | 488 void AXTable::cells(AXObject::AccessibilityChildrenVector& cells) |
497 { | 489 { |
498 if (!m_renderer) | 490 if (!m_renderer) |
499 return; | 491 return; |
500 | 492 |
501 updateChildrenIfNecessary(); | 493 updateChildrenIfNecessary(); |
502 | 494 |
503 int numRows = m_rows.size(); | 495 int numRows = m_rows.size(); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 } | 587 } |
596 | 588 |
597 // try the standard | 589 // try the standard |
598 if (title.isEmpty()) | 590 if (title.isEmpty()) |
599 title = AXRenderObject::title(); | 591 title = AXRenderObject::title(); |
600 | 592 |
601 return title; | 593 return title; |
602 } | 594 } |
603 | 595 |
604 } // namespace blink | 596 } // namespace blink |
OLD | NEW |