Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(64)

Side by Side Diff: Source/modules/accessibility/AXTableColumn.cpp

Issue 1076453004: Show reasons why nodes are ignored in accessibility sidebar (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 AXObject* AXTableColumn::headerObject() 114 AXObject* AXTableColumn::headerObject()
115 { 115 {
116 AccessibilityChildrenVector headers; 116 AccessibilityChildrenVector headers;
117 headerObjectsForColumn(headers); 117 headerObjectsForColumn(headers);
118 if (!headers.size()) 118 if (!headers.size())
119 return 0; 119 return 0;
120 120
121 return headers[0].get(); 121 return headers[0].get();
122 } 122 }
123 123
124 bool AXTableColumn::computeAccessibilityIsIgnored() const 124 bool AXTableColumn::computeAccessibilityIsIgnored(PassRefPtr<TypeBuilder::Array< TypeBuilder::Accessibility::AXProperty>> ignoredReasons) const
125 { 125 {
126 if (!m_parent) 126 if (!m_parent)
127 return true; 127 return true;
128 128
129 if (ignoredReasons)
130 return m_parent->computeAccessibilityIsIgnored(ignoredReasons);
131
129 return m_parent->accessibilityIsIgnored(); 132 return m_parent->accessibilityIsIgnored();
130 } 133 }
131 134
132 void AXTableColumn::addChildren() 135 void AXTableColumn::addChildren()
133 { 136 {
134 ASSERT(!m_haveChildren); 137 ASSERT(!m_haveChildren);
135 138
136 m_haveChildren = true; 139 m_haveChildren = true;
137 if (!m_parent || !m_parent->isAXTable()) 140 if (!m_parent || !m_parent->isAXTable())
138 return; 141 return;
139 142
140 AXTable* parentTable = toAXTable(m_parent); 143 AXTable* parentTable = toAXTable(m_parent);
141 int numRows = parentTable->rowCount(); 144 int numRows = parentTable->rowCount();
142 145
143 for (int i = 0; i < numRows; i++) { 146 for (int i = 0; i < numRows; i++) {
144 AXTableCell* cell = parentTable->cellForColumnAndRow(m_columnIndex, i); 147 AXTableCell* cell = parentTable->cellForColumnAndRow(m_columnIndex, i);
145 if (!cell) 148 if (!cell)
146 continue; 149 continue;
147 150
148 // make sure the last one isn't the same as this one (rowspan cells) 151 // make sure the last one isn't the same as this one (rowspan cells)
149 if (m_children.size() > 0 && m_children.last() == cell) 152 if (m_children.size() > 0 && m_children.last() == cell)
150 continue; 153 continue;
151 154
152 m_children.append(cell); 155 m_children.append(cell);
153 m_columnRect.unite(cell->elementRect()); 156 m_columnRect.unite(cell->elementRect());
154 } 157 }
155 } 158 }
156 159
157 } // namespace blink 160 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698