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 22 matching lines...) Expand all Loading... |
33 #include "core/accessibility/AXTableCell.h" | 33 #include "core/accessibility/AXTableCell.h" |
34 #include "core/accessibility/AXTableColumn.h" | 34 #include "core/accessibility/AXTableColumn.h" |
35 #include "core/accessibility/AXTableRow.h" | 35 #include "core/accessibility/AXTableRow.h" |
36 #include "core/dom/ElementTraversal.h" | 36 #include "core/dom/ElementTraversal.h" |
37 #include "core/html/HTMLCollection.h" | 37 #include "core/html/HTMLCollection.h" |
38 #include "core/html/HTMLTableCaptionElement.h" | 38 #include "core/html/HTMLTableCaptionElement.h" |
39 #include "core/html/HTMLTableCellElement.h" | 39 #include "core/html/HTMLTableCellElement.h" |
40 #include "core/html/HTMLTableColElement.h" | 40 #include "core/html/HTMLTableColElement.h" |
41 #include "core/html/HTMLTableElement.h" | 41 #include "core/html/HTMLTableElement.h" |
42 #include "core/html/HTMLTableRowElement.h" | 42 #include "core/html/HTMLTableRowElement.h" |
| 43 #include "core/html/HTMLTableRowsCollection.h" |
43 #include "core/html/HTMLTableSectionElement.h" | 44 #include "core/html/HTMLTableSectionElement.h" |
44 #include "core/rendering/RenderTableCell.h" | 45 #include "core/rendering/RenderTableCell.h" |
45 | 46 |
46 namespace WebCore { | 47 namespace WebCore { |
47 | 48 |
48 using namespace HTMLNames; | 49 using namespace HTMLNames; |
49 | 50 |
50 AXTable::AXTable(RenderObject* renderer) | 51 AXTable::AXTable(RenderObject* renderer) |
51 : AXRenderObject(renderer) | 52 : AXRenderObject(renderer) |
52 , m_headerContainer(nullptr) | 53 , m_headerContainer(nullptr) |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 if (elementHasAriaRole(tableElement->tFoot())) | 131 if (elementHasAriaRole(tableElement->tFoot())) |
131 return false; | 132 return false; |
132 | 133 |
133 RefPtrWillBeRawPtr<HTMLCollection> bodies = tableElement->tBodies(); | 134 RefPtrWillBeRawPtr<HTMLCollection> bodies = tableElement->tBodies(); |
134 for (unsigned bodyIndex = 0; bodyIndex < bodies->length(); ++bodyIndex) { | 135 for (unsigned bodyIndex = 0; bodyIndex < bodies->length(); ++bodyIndex) { |
135 Element* bodyElement = bodies->item(bodyIndex); | 136 Element* bodyElement = bodies->item(bodyIndex); |
136 if (elementHasAriaRole(bodyElement)) | 137 if (elementHasAriaRole(bodyElement)) |
137 return false; | 138 return false; |
138 } | 139 } |
139 | 140 |
140 RefPtrWillBeRawPtr<HTMLCollection> rows = tableElement->rows(); | 141 RefPtrWillBeRawPtr<HTMLTableRowsCollection> rows = tableElement->rows(); |
141 for (unsigned rowIndex = 0; rowIndex < rows->length(); ++rowIndex) { | 142 unsigned rowCount = rows->length(); |
| 143 for (unsigned rowIndex = 0; rowIndex < rowCount; ++rowIndex) { |
142 Element* rowElement = rows->item(rowIndex); | 144 Element* rowElement = rows->item(rowIndex); |
143 if (elementHasAriaRole(rowElement)) | 145 if (elementHasAriaRole(rowElement)) |
144 return false; | 146 return false; |
145 if (rowElement->hasTagName(trTag)) { | 147 if (rowElement->hasTagName(trTag)) { |
146 HTMLTableRowElement* row = static_cast<HTMLTableRowElement*>(rowElem
ent); | 148 HTMLTableRowElement* row = static_cast<HTMLTableRowElement*>(rowElem
ent); |
147 RefPtrWillBeRawPtr<HTMLCollection> cells = row->cells(); | 149 RefPtrWillBeRawPtr<HTMLCollection> cells = row->cells(); |
148 for (unsigned cellIndex = 0; cellIndex < cells->length(); ++cellInde
x) { | 150 for (unsigned cellIndex = 0; cellIndex < cells->length(); ++cellInde
x) { |
149 if (elementHasAriaRole(cells->item(cellIndex))) | 151 if (elementHasAriaRole(cells->item(cellIndex))) |
150 return false; | 152 return false; |
151 } | 153 } |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 } | 573 } |
572 | 574 |
573 // try the standard | 575 // try the standard |
574 if (title.isEmpty()) | 576 if (title.isEmpty()) |
575 title = AXRenderObject::title(); | 577 title = AXRenderObject::title(); |
576 | 578 |
577 return title; | 579 return title; |
578 } | 580 } |
579 | 581 |
580 } // namespace WebCore | 582 } // namespace WebCore |
OLD | NEW |