| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // this will be filled in when addChildren is called | 65 // this will be filled in when addChildren is called |
| 66 return m_columnRect; | 66 return m_columnRect; |
| 67 } | 67 } |
| 68 | 68 |
| 69 void AXTableColumn::headerObjectsForColumn(AccessibilityChildrenVector& headers) | 69 void AXTableColumn::headerObjectsForColumn(AccessibilityChildrenVector& headers) |
| 70 { | 70 { |
| 71 if (!m_parent) | 71 if (!m_parent) |
| 72 return; | 72 return; |
| 73 | 73 |
| 74 RenderObject* renderer = m_parent->renderer(); | 74 RenderObject* renderer = m_parent->renderer(); |
| 75 if (!renderer || !renderer->isTable()) | 75 if (!renderer) |
| 76 return; |
| 77 |
| 78 if (!m_parent->isAXTable()) |
| 79 return; |
| 80 |
| 81 if (toAXTable(m_parent)->isAriaTable()) { |
| 82 AccessibilityChildrenVector columnChildren = children(); |
| 83 unsigned childrenCount = columnChildren.size(); |
| 84 for (unsigned i = 0; i < childrenCount; i++) { |
| 85 AXObject* cell = columnChildren[i].get(); |
| 86 if (cell->roleValue() == ColumnHeaderRole) |
| 87 headers.append(cell); |
| 88 } |
| 89 return; |
| 90 } |
| 91 |
| 92 if (!renderer->isTable()) |
| 76 return; | 93 return; |
| 77 | 94 |
| 78 LayoutTable* table = toLayoutTable(renderer); | 95 LayoutTable* table = toLayoutTable(renderer); |
| 79 LayoutTableSection* tableSection = table->topSection(); | 96 LayoutTableSection* tableSection = table->topSection(); |
| 80 for (; tableSection; tableSection = table->sectionBelow(tableSection, SkipEm
ptySections)) { | 97 for (; tableSection; tableSection = table->sectionBelow(tableSection, SkipEm
ptySections)) { |
| 81 unsigned numRows = tableSection->numRows(); | 98 unsigned numRows = tableSection->numRows(); |
| 82 for (unsigned r = 0; r < numRows; r++) { | 99 for (unsigned r = 0; r < numRows; r++) { |
| 83 LayoutTableCell* layoutCell = tableSection->primaryCellAt(r, m_colum
nIndex); | 100 LayoutTableCell* layoutCell = tableSection->primaryCellAt(r, m_colum
nIndex); |
| 84 if (!layoutCell) | 101 if (!layoutCell) |
| 85 continue; | 102 continue; |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // make sure the last one isn't the same as this one (rowspan cells) | 227 // make sure the last one isn't the same as this one (rowspan cells) |
| 211 if (m_children.size() > 0 && m_children.last() == cell) | 228 if (m_children.size() > 0 && m_children.last() == cell) |
| 212 continue; | 229 continue; |
| 213 | 230 |
| 214 m_children.append(cell); | 231 m_children.append(cell); |
| 215 m_columnRect.unite(cell->elementRect()); | 232 m_columnRect.unite(cell->elementRect()); |
| 216 } | 233 } |
| 217 } | 234 } |
| 218 | 235 |
| 219 } // namespace blink | 236 } // namespace blink |
| OLD | NEW |