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

Unified Diff: Source/core/accessibility/AXTable.cpp

Issue 334713006: Use stricter typing for NodeLists throughout the code base (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/core/dom/ChildListMutationScope.cpp » ('j') | Source/core/dom/Document.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/accessibility/AXTable.cpp
diff --git a/Source/core/accessibility/AXTable.cpp b/Source/core/accessibility/AXTable.cpp
index efec030faca837df0229d5fd03774802d096ede6..22a0d4542643f31c6d5b45e6c7c9b88c195b1d21 100644
--- a/Source/core/accessibility/AXTable.cpp
+++ b/Source/core/accessibility/AXTable.cpp
@@ -40,6 +40,7 @@
#include "core/html/HTMLTableColElement.h"
#include "core/html/HTMLTableElement.h"
#include "core/html/HTMLTableRowElement.h"
+#include "core/html/HTMLTableRowsCollection.h"
#include "core/html/HTMLTableSectionElement.h"
#include "core/rendering/RenderTableCell.h"
@@ -137,8 +138,9 @@ bool AXTable::isDataTable() const
return false;
}
- RefPtrWillBeRawPtr<HTMLCollection> rows = tableElement->rows();
- for (unsigned rowIndex = 0; rowIndex < rows->length(); ++rowIndex) {
+ RefPtrWillBeRawPtr<HTMLTableRowsCollection> rows = tableElement->rows();
+ unsigned rowCount = rows->length();
adamk 2014/06/16 20:23:17 Nit: this reads like over-optimizing to me, consid
Inactive 2014/06/16 20:35:50 This avoids "if (isCachedNodeCountValid())" check
+ for (unsigned rowIndex = 0; rowIndex < rowCount; ++rowIndex) {
Element* rowElement = rows->item(rowIndex);
if (elementHasAriaRole(rowElement))
return false;
« no previous file with comments | « no previous file | Source/core/dom/ChildListMutationScope.cpp » ('j') | Source/core/dom/Document.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698