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

Unified Diff: chrome/browser/resources/chromeos/chromevox/common/traverse_table.js

Issue 1774743002: Fix some ChromeVox Closure compiler errors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/common/traverse_table.js
diff --git a/chrome/browser/resources/chromeos/chromevox/common/traverse_table.js b/chrome/browser/resources/chromeos/chromevox/common/traverse_table.js
index 8927c1d88462d81566568ebdeae74395867ea69d..7b6c0a4e969b27e3c63a447409ef52b91c6fe7c2 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/traverse_table.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/traverse_table.js
@@ -60,16 +60,16 @@ ShadowTableNode.prototype.colSpan;
/**
* The row index of the corresponding active table cell
- * @type {?number}
+ * @type {number}
*/
-ShadowTableNode.prototype.i;
+ShadowTableNode.prototype.i = -1;
/**
* The column index of the corresponding active table cell
- * @type {?number}
+ * @type {number}
*/
-ShadowTableNode.prototype.j;
+ShadowTableNode.prototype.j = -1;
/**
@@ -261,10 +261,13 @@ cvox.TraverseTable.prototype.initialize = function(tableNode) {
/**
* Finds the cell cursor containing the specified node within the table.
* Returns null if there is no close cell.
- * @param {!Node} node The node for which to find the cursor.
+ * @param {Node} node The node for which to find the cursor.
* @return {Array<number>} The table index for the node.
*/
cvox.TraverseTable.prototype.findNearestCursor = function(node) {
+ if (!node) {
+ return null;
+ }
// TODO (stoarca): The current structure for representing the
// shadow table is not optimal for this query, but it's not urgent
// since this only gets executed at most once per user action.

Powered by Google App Engine
This is Rietveld 408576698