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

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

Issue 1019313003: Use c++11 range loops in accessibility (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/modules/accessibility/AXTable.cpp ('k') | Source/modules/accessibility/AXTableRow.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 return; 72 return;
73 73
74 LayoutObject* layoutObject = m_parent->layoutObject(); 74 LayoutObject* layoutObject = m_parent->layoutObject();
75 if (!layoutObject) 75 if (!layoutObject)
76 return; 76 return;
77 77
78 if (!m_parent->isAXTable()) 78 if (!m_parent->isAXTable())
79 return; 79 return;
80 80
81 if (toAXTable(m_parent)->isAriaTable()) { 81 if (toAXTable(m_parent)->isAriaTable()) {
82 const AccessibilityChildrenVector& columnChildren = children(); 82 for (const auto& cell : 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) 83 if (cell->roleValue() == ColumnHeaderRole)
87 headers.append(cell); 84 headers.append(cell);
88 } 85 }
89 return; 86 return;
90 } 87 }
91 88
92 if (!layoutObject->isTable()) 89 if (!layoutObject->isTable())
93 return; 90 return;
94 91
95 LayoutTable* table = toLayoutTable(layoutObject); 92 LayoutTable* table = toLayoutTable(layoutObject);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 // make sure the last one isn't the same as this one (rowspan cells) 148 // make sure the last one isn't the same as this one (rowspan cells)
152 if (m_children.size() > 0 && m_children.last() == cell) 149 if (m_children.size() > 0 && m_children.last() == cell)
153 continue; 150 continue;
154 151
155 m_children.append(cell); 152 m_children.append(cell);
156 m_columnRect.unite(cell->elementRect()); 153 m_columnRect.unite(cell->elementRect());
157 } 154 }
158 } 155 }
159 156
160 } // namespace blink 157 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXTable.cpp ('k') | Source/modules/accessibility/AXTableRow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698