Index: ui/webui/resources/js/cr/ui/focus_grid.js |
diff --git a/ui/webui/resources/js/cr/ui/focus_grid.js b/ui/webui/resources/js/cr/ui/focus_grid.js |
index 4ff1635f06f3fce2e1bd2757a03a34204372010e..e1e4ae2dfb5f03d3c8e6b1f057a5d1d3a5af140c 100644 |
--- a/ui/webui/resources/js/cr/ui/focus_grid.js |
+++ b/ui/webui/resources/js/cr/ui/focus_grid.js |
@@ -43,6 +43,7 @@ cr.define('cr.ui', function() { |
* Row delegate to overwrite the behavior of a mouse click to deselect any row |
* that wasn't clicked. |
* @param {cr.ui.FocusGrid} focusGrid |
+ * @constructor |
* @implements {cr.ui.FocusRow.Delegate} |
*/ |
FocusGrid.RowDelegate = function(focusGrid) { |
@@ -62,7 +63,7 @@ cr.define('cr.ui', function() { |
// Only the clicked row should be active. |
this.focusGrid_.rows.forEach(function(row) { |
- row.makeRowActive(row.contains(e.target)); |
+ row.makeRowActive(row.contains(/** @type {Node} */ (e.target))); |
Dan Beam
2015/02/04 17:08:05
how do you know this is a node?
hcarmona
2015/02/04 19:19:55
Changed casts to assertInstanceof and verified tha
|
}); |
e.preventDefault(); |
@@ -85,7 +86,7 @@ cr.define('cr.ui', function() { |
*/ |
getRowIndexForTarget: function(target) { |
for (var i = 0; i < this.rows.length; ++i) { |
- if (this.rows[i].contains(target)) |
+ if (this.rows[i].contains(/** @type {Node} */ (target))) |
Dan Beam
2015/02/04 17:08:05
how do you know this is a node?
hcarmona
2015/02/04 19:19:55
This function doesn't know where it will be called
|
return i; |
} |
return -1; |
@@ -122,7 +123,7 @@ cr.define('cr.ui', function() { |
/** |
* Keep track of the last column that the user manually focused. |
- * @param {Event} The focusin event. |
+ * @param {Event} e The focusin event. |
* @private |
*/ |
onFocusin_: function(e) { |