| 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 if (!IsTableRow()) | 68 if (!IsTableRow()) |
| 69 return AXLayoutObject::DetermineAccessibilityRole(); | 69 return AXLayoutObject::DetermineAccessibilityRole(); |
| 70 | 70 |
| 71 if ((aria_role_ = DetermineAriaRoleAttribute()) != kUnknownRole) | 71 if ((aria_role_ = DetermineAriaRoleAttribute()) != kUnknownRole) |
| 72 return aria_role_; | 72 return aria_role_; |
| 73 | 73 |
| 74 return kRowRole; | 74 return kRowRole; |
| 75 } | 75 } |
| 76 | 76 |
| 77 bool AXTableRow::IsTableRow() const { | 77 bool AXTableRow::IsTableRow() const { |
| 78 AXObject* table = ParentTable(); | 78 AXObjectImpl* table = ParentTable(); |
| 79 if (!table || !table->IsAXTable()) | 79 if (!table || !table->IsAXTable()) |
| 80 return false; | 80 return false; |
| 81 | 81 |
| 82 return true; | 82 return true; |
| 83 } | 83 } |
| 84 | 84 |
| 85 bool AXTableRow::ComputeAccessibilityIsIgnored( | 85 bool AXTableRow::ComputeAccessibilityIsIgnored( |
| 86 IgnoredReasons* ignored_reasons) const { | 86 IgnoredReasons* ignored_reasons) const { |
| 87 AXObjectInclusion decision = DefaultObjectInclusion(ignored_reasons); | 87 AXObjectInclusion decision = DefaultObjectInclusion(ignored_reasons); |
| 88 if (decision == kIncludeObject) | 88 if (decision == kIncludeObject) |
| 89 return false; | 89 return false; |
| 90 if (decision == kIgnoreObject) | 90 if (decision == kIgnoreObject) |
| 91 return true; | 91 return true; |
| 92 | 92 |
| 93 if (!IsTableRow()) | 93 if (!IsTableRow()) |
| 94 return AXLayoutObject::ComputeAccessibilityIsIgnored(ignored_reasons); | 94 return AXLayoutObject::ComputeAccessibilityIsIgnored(ignored_reasons); |
| 95 | 95 |
| 96 return false; | 96 return false; |
| 97 } | 97 } |
| 98 | 98 |
| 99 AXObject* AXTableRow::ParentTable() const { | 99 AXObjectImpl* AXTableRow::ParentTable() const { |
| 100 AXObject* parent = ParentObjectUnignored(); | 100 AXObjectImpl* parent = ParentObjectUnignored(); |
| 101 if (!parent || !parent->IsAXTable()) | 101 if (!parent || !parent->IsAXTable()) |
| 102 return 0; | 102 return 0; |
| 103 | 103 |
| 104 return parent; | 104 return parent; |
| 105 } | 105 } |
| 106 | 106 |
| 107 AXObject* AXTableRow::HeaderObject() { | 107 AXObjectImpl* AXTableRow::HeaderObject() { |
| 108 AXObjectVector headers; | 108 AXObjectVector headers; |
| 109 HeaderObjectsForRow(headers); | 109 HeaderObjectsForRow(headers); |
| 110 if (!headers.size()) | 110 if (!headers.size()) |
| 111 return 0; | 111 return 0; |
| 112 | 112 |
| 113 return headers[0].Get(); | 113 return headers[0].Get(); |
| 114 } | 114 } |
| 115 | 115 |
| 116 unsigned AXTableRow::AriaColumnIndex() const { | 116 unsigned AXTableRow::AriaColumnIndex() const { |
| 117 const AtomicString& col_index_value = GetAttribute(aria_colindexAttr); | 117 const AtomicString& col_index_value = GetAttribute(aria_colindexAttr); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 136 for (const auto& cell : Children()) { | 136 for (const auto& cell : Children()) { |
| 137 if (!cell->IsTableCell()) | 137 if (!cell->IsTableCell()) |
| 138 continue; | 138 continue; |
| 139 | 139 |
| 140 if (ToAXTableCell(cell.Get())->ScanToDecideHeaderRole() == kRowHeaderRole) | 140 if (ToAXTableCell(cell.Get())->ScanToDecideHeaderRole() == kRowHeaderRole) |
| 141 headers.push_back(cell); | 141 headers.push_back(cell); |
| 142 } | 142 } |
| 143 } | 143 } |
| 144 | 144 |
| 145 } // namespace blink | 145 } // namespace blink |
| OLD | NEW |