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

Unified Diff: ui/webui/resources/js/cr/ui/focus_grid.js

Issue 895283002: Fix Closure Compilation for chrome://downloads and chrome://history (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « chrome/browser/resources/downloads/downloads.js ('k') | ui/webui/resources/js/cr/ui/focus_row.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « chrome/browser/resources/downloads/downloads.js ('k') | ui/webui/resources/js/cr/ui/focus_row.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698