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

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

Issue 924083004: Shorten Closure template notation from Array.<*> to Array<*> in cvox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 6253fa07f7552038904961310633b4a11c44ff11..8927c1d88462d81566568ebdeae74395867ea69d 100644
--- a/chrome/browser/resources/chromeos/chromevox/common/traverse_table.js
+++ b/chrome/browser/resources/chromeos/chromevox/common/traverse_table.js
@@ -22,7 +22,19 @@ goog.require('cvox.TraverseUtil');
* An object that represents an active table cell inside the shadow table.
* @constructor
*/
-function ShadowTableNode() {}
+function ShadowTableNode() {
+ /**
+ * The cells that are row headers of the corresponding active table cell
+ * @type {!Array}
+ */
+ this.rowHeaderCells = [];
+
+ /**
+ * The cells that are column headers of the corresponding active table cell
+ * @type {!Array}
+ */
+ this.colHeaderCells = [];
+}
/**
@@ -68,21 +80,6 @@ ShadowTableNode.prototype.activeCell;
/**
- * The cells that are row headers of the corresponding active table cell
- * @type {!Array}
- */
-ShadowTableNode.prototype.rowHeaderCells = [];
-
-
-/**
- * The cells that are column headers of the corresponding active table cell
- * @type {!Array}
- */
-ShadowTableNode.prototype.colHeaderCells = [];
-
-
-
-/**
* Initializes the traversal with the provided table node.
*
* @constructor
@@ -114,7 +111,7 @@ cvox.TraverseTable = function(tableNode) {
* the (1,3) position, eliminating the need to check for predecessor cells
* with rowspan/colspan every time we traverse the table.
*
- * @type {!Array.<Array.<ShadowTableNode>>}
+ * @type {!Array<Array<ShadowTableNode>>}
* @private
*/
this.shadowTable_ = [];
@@ -125,7 +122,7 @@ cvox.TraverseTable = function(tableNode) {
* initialization and then only recalculated if the table changes.
* This array is used by findHeaderCells() to determine table row headers
* and column headers.
- * @type {Array.<ShadowTableNode>}
+ * @type {Array<ShadowTableNode>}
* @private
*/
this.candidateHeaders_ = [];
@@ -136,7 +133,7 @@ cvox.TraverseTable = function(tableNode) {
* other cells) then the first one will be associated with the ID. This means
* that shadow nodes that have spanned set to true will not be included in
* this array.
- * @type {Array.<ShadowTableNode>}
+ * @type {Array<ShadowTableNode>}
* @private
*/
this.idToShadowNode_ = [];
@@ -265,7 +262,7 @@ 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.
- * @return {Array.<number>} The table index for the node.
+ * @return {Array<number>} The table index for the node.
*/
cvox.TraverseTable.prototype.findNearestCursor = function(node) {
// TODO (stoarca): The current structure for representing the
@@ -856,7 +853,7 @@ cvox.TraverseTable.prototype.getCell = function() {
/**
* Gets the cell at the specified location.
- * @param {Array.<number>} index The index <i, j> of the required cell.
+ * @param {Array<number>} index The index <i, j> of the required cell.
* @return {?Node} The cell <TD> or <TH> or role='gridcell' node at the
* specified location. Null if that cell does not exist.
*/
@@ -1220,7 +1217,7 @@ cvox.TraverseTable.prototype.goToCol = function(index) {
/**
* Moves to the cell at the specified index <i, j> in the table. Updates the
* cell cursor.
- * @param {Array.<number>} index The index <i, j> of the required cell.
+ * @param {Array<number>} index The index <i, j> of the required cell.
* @return {boolean} Either:
* 1) True if the index is valid and the update has been made.
* 2) False if the index is not valid (either less than 0, greater than

Powered by Google App Engine
This is Rietveld 408576698