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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 | 514 |
515 AXTableCell* AXTable::cellForColumnAndRow(unsigned column, unsigned row) | 515 AXTableCell* AXTable::cellForColumnAndRow(unsigned column, unsigned row) |
516 { | 516 { |
517 updateChildrenIfNecessary(); | 517 updateChildrenIfNecessary(); |
518 if (column >= columnCount() || row >= rowCount()) | 518 if (column >= columnCount() || row >= rowCount()) |
519 return 0; | 519 return 0; |
520 | 520 |
521 // Iterate backwards through the rows in case the desired cell has a rowspan
and exists in a previous row. | 521 // Iterate backwards through the rows in case the desired cell has a rowspan
and exists in a previous row. |
522 for (unsigned rowIndexCounter = row + 1; rowIndexCounter > 0; --rowIndexCoun
ter) { | 522 for (unsigned rowIndexCounter = row + 1; rowIndexCounter > 0; --rowIndexCoun
ter) { |
523 unsigned rowIndex = rowIndexCounter - 1; | 523 unsigned rowIndex = rowIndexCounter - 1; |
524 const AccessibilityChildrenVector& children = m_rows[rowIndex]->children
(); | 524 const auto& children = m_rows[rowIndex]->children(); |
525 // Since some cells may have colspans, we have to check the actual range
of each | 525 // Since some cells may have colspans, we have to check the actual range
of each |
526 // cell to determine which is the right one. | 526 // cell to determine which is the right one. |
527 for (unsigned colIndexCounter = std::min(static_cast<unsigned>(children.
size()), column + 1); colIndexCounter > 0; --colIndexCounter) { | 527 for (unsigned colIndexCounter = std::min(static_cast<unsigned>(children.
size()), column + 1); colIndexCounter > 0; --colIndexCounter) { |
528 unsigned colIndex = colIndexCounter - 1; | 528 unsigned colIndex = colIndexCounter - 1; |
529 AXObject* child = children[colIndex].get(); | 529 AXObject* child = children[colIndex].get(); |
530 | 530 |
531 if (!child->isTableCell()) | 531 if (!child->isTableCell()) |
532 continue; | 532 continue; |
533 | 533 |
534 pair<unsigned, unsigned> columnRange; | 534 pair<unsigned, unsigned> columnRange; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
586 } | 586 } |
587 | 587 |
588 // try the standard | 588 // try the standard |
589 if (title.isEmpty()) | 589 if (title.isEmpty()) |
590 title = AXLayoutObject::title(mode); | 590 title = AXLayoutObject::title(mode); |
591 | 591 |
592 return title; | 592 return title; |
593 } | 593 } |
594 | 594 |
595 } // namespace blink | 595 } // namespace blink |
OLD | NEW |