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

Side by Side Diff: Source/core/accessibility/AXTable.cpp

Issue 280123002: Oilpan: move LiveNodeList collections to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Have NodeRareData clear out NodeListsNodeData instead. Created 6 years, 7 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 if (!isHTMLTableElement(tableNode)) 123 if (!isHTMLTableElement(tableNode))
124 return false; 124 return false;
125 125
126 // Do not consider it a data table if any of its descendants have an ARIA ro le. 126 // Do not consider it a data table if any of its descendants have an ARIA ro le.
127 HTMLTableElement* tableElement = toHTMLTableElement(tableNode); 127 HTMLTableElement* tableElement = toHTMLTableElement(tableNode);
128 if (elementHasAriaRole(tableElement->tHead())) 128 if (elementHasAriaRole(tableElement->tHead()))
129 return false; 129 return false;
130 if (elementHasAriaRole(tableElement->tFoot())) 130 if (elementHasAriaRole(tableElement->tFoot()))
131 return false; 131 return false;
132 132
133 RefPtr<HTMLCollection> bodies = tableElement->tBodies(); 133 RefPtrWillBeRawPtr<HTMLCollection> bodies = tableElement->tBodies();
134 for (unsigned bodyIndex = 0; bodyIndex < bodies->length(); ++bodyIndex) { 134 for (unsigned bodyIndex = 0; bodyIndex < bodies->length(); ++bodyIndex) {
135 Element* bodyElement = bodies->item(bodyIndex); 135 Element* bodyElement = bodies->item(bodyIndex);
136 if (elementHasAriaRole(bodyElement)) 136 if (elementHasAriaRole(bodyElement))
137 return false; 137 return false;
138 } 138 }
139 139
140 RefPtr<HTMLCollection> rows = tableElement->rows(); 140 RefPtrWillBeRawPtr<HTMLCollection> rows = tableElement->rows();
141 for (unsigned rowIndex = 0; rowIndex < rows->length(); ++rowIndex) { 141 for (unsigned rowIndex = 0; rowIndex < rows->length(); ++rowIndex) {
142 Element* rowElement = rows->item(rowIndex); 142 Element* rowElement = rows->item(rowIndex);
143 if (elementHasAriaRole(rowElement)) 143 if (elementHasAriaRole(rowElement))
144 return false; 144 return false;
145 if (rowElement->hasTagName(trTag)) { 145 if (rowElement->hasTagName(trTag)) {
146 HTMLTableRowElement* row = static_cast<HTMLTableRowElement*>(rowElem ent); 146 HTMLTableRowElement* row = static_cast<HTMLTableRowElement*>(rowElem ent);
147 RefPtr<HTMLCollection> cells = row->cells(); 147 RefPtrWillBeRawPtr<HTMLCollection> cells = row->cells();
148 for (unsigned cellIndex = 0; cellIndex < cells->length(); ++cellInde x) { 148 for (unsigned cellIndex = 0; cellIndex < cells->length(); ++cellInde x) {
149 if (elementHasAriaRole(cells->item(cellIndex))) 149 if (elementHasAriaRole(cells->item(cellIndex)))
150 return false; 150 return false;
151 } 151 }
152 } 152 }
153 } 153 }
154 154
155 // If there is a caption element, summary, THEAD, or TFOOT section, it's mos t certainly a data table 155 // If there is a caption element, summary, THEAD, or TFOOT section, it's mos t certainly a data table
156 if (!tableElement->summary().isEmpty() || tableElement->tHead() || tableElem ent->tFoot() || tableElement->caption()) 156 if (!tableElement->summary().isEmpty() || tableElement->tHead() || tableElem ent->tFoot() || tableElement->caption())
157 return true; 157 return true;
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after
571 } 571 }
572 572
573 // try the standard 573 // try the standard
574 if (title.isEmpty()) 574 if (title.isEmpty())
575 title = AXRenderObject::title(); 575 title = AXRenderObject::title();
576 576
577 return title; 577 return title;
578 } 578 }
579 579
580 } // namespace WebCore 580 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8WindowCustom.cpp ('k') | Source/core/dom/ChildListMutationScope.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698