| 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 RefPtrWillBeRawPtr<HTMLCollection> bodies = tableElement->tBodies(); | 134 RefPtrWillBeRawPtr<HTMLCollection> bodies = tableElement->tBodies(); |
| 135 for (unsigned bodyIndex = 0; bodyIndex < bodies->length(); ++bodyIndex) { | 135 for (unsigned bodyIndex = 0; bodyIndex < bodies->length(); ++bodyIndex) { |
| 136 Element* bodyElement = bodies->item(bodyIndex); | 136 Element* bodyElement = bodies->item(bodyIndex); |
| 137 if (elementHasAriaRole(bodyElement)) | 137 if (elementHasAriaRole(bodyElement)) |
| 138 return false; | 138 return false; |
| 139 } | 139 } |
| 140 | 140 |
| 141 RefPtrWillBeRawPtr<HTMLTableRowsCollection> rows = tableElement->rows(); | 141 RefPtrWillBeRawPtr<HTMLTableRowsCollection> rows = tableElement->rows(); |
| 142 unsigned rowCount = rows->length(); | 142 unsigned rowCount = rows->length(); |
| 143 for (unsigned rowIndex = 0; rowIndex < rowCount; ++rowIndex) { | 143 for (unsigned rowIndex = 0; rowIndex < rowCount; ++rowIndex) { |
| 144 Element* rowElement = rows->item(rowIndex); | 144 HTMLTableRowElement* rowElement = rows->item(rowIndex); |
| 145 if (elementHasAriaRole(rowElement)) | 145 if (elementHasAriaRole(rowElement)) |
| 146 return false; | 146 return false; |
| 147 if (isHTMLTableRowElement(*rowElement)) { | 147 RefPtrWillBeRawPtr<HTMLCollection> cells = rowElement->cells(); |
| 148 RefPtrWillBeRawPtr<HTMLCollection> cells = toHTMLTableRowElement(row
Element)->cells(); | 148 for (unsigned cellIndex = 0; cellIndex < cells->length(); ++cellIndex) { |
| 149 for (unsigned cellIndex = 0; cellIndex < cells->length(); ++cellInde
x) { | 149 if (elementHasAriaRole(cells->item(cellIndex))) |
| 150 if (elementHasAriaRole(cells->item(cellIndex))) | 150 return false; |
| 151 return false; | |
| 152 } | |
| 153 } | 151 } |
| 154 } | 152 } |
| 155 | 153 |
| 156 // If there is a caption element, summary, THEAD, or TFOOT section, it's mos
t certainly a data table | 154 // If there is a caption element, summary, THEAD, or TFOOT section, it's mos
t certainly a data table |
| 157 if (!tableElement->summary().isEmpty() || tableElement->tHead() || tableElem
ent->tFoot() || tableElement->caption()) | 155 if (!tableElement->summary().isEmpty() || tableElement->tHead() || tableElem
ent->tFoot() || tableElement->caption()) |
| 158 return true; | 156 return true; |
| 159 | 157 |
| 160 // if someone used "rules" attribute than the table should appear | 158 // if someone used "rules" attribute than the table should appear |
| 161 if (!tableElement->rules().isEmpty()) | 159 if (!tableElement->rules().isEmpty()) |
| 162 return true; | 160 return true; |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 } | 570 } |
| 573 | 571 |
| 574 // try the standard | 572 // try the standard |
| 575 if (title.isEmpty()) | 573 if (title.isEmpty()) |
| 576 title = AXRenderObject::title(); | 574 title = AXRenderObject::title(); |
| 577 | 575 |
| 578 return title; | 576 return title; |
| 579 } | 577 } |
| 580 | 578 |
| 581 } // namespace blink | 579 } // namespace blink |
| OLD | NEW |