Index: ui/webui/resources/js/cr/ui/list.js |
diff --git a/ui/webui/resources/js/cr/ui/list.js b/ui/webui/resources/js/cr/ui/list.js |
index 720f0704ee2d43203d0cc1f73242aaaca512882b..ae30992b646cb1f23d878d9ecc5e0f9a412be1b0 100644 |
--- a/ui/webui/resources/js/cr/ui/list.js |
+++ b/ui/webui/resources/js/cr/ui/list.js |
@@ -155,7 +155,7 @@ cr.define('cr.ui', function() { |
/** |
* Cached item for measuring the default item size by measureItem(). |
- * @type {ListItem} |
+ * @type {cr.ui.ListItem} |
*/ |
cachedMeasuredItem_: null, |
@@ -523,22 +523,21 @@ cr.define('cr.ui', function() { |
* @private |
*/ |
handleElementBlur_: function(e) { |
- if (!this.contains(e.relatedTarget)) |
Dan Beam
2014/09/23 02:46:56
why did you remove?
Vitaly Pavlenko
2014/09/23 22:20:55
Based on this list, blur can't have relatedTarget:
|
- this.hasElementFocus = false; |
+ this.hasElementFocus = false; |
}, |
/** |
* Returns the list item element containing the given element, or null if |
* it doesn't belong to any list item element. |
* @param {HTMLElement} element The element. |
- * @return {HTMLLIElement} The list item containing |element|, or null. |
+ * @return {cr.ui.ListItem} The list item containing |element|, or null. |
*/ |
getListItemAncestor: function(element) { |
var container = element; |
while (container && container.parentNode != this) { |
container = container.parentNode; |
} |
- return container && assertInstanceof(container, HTMLLIElement); |
+ return container && assertInstanceof(container, cr.ui.ListItem); |
}, |
/** |
@@ -769,7 +768,7 @@ cr.define('cr.ui', function() { |
* Takes a value from the data model and finds the associated list item. |
* @param {*} value The value in the data model that we want to get the list |
* item for. |
- * @return {ListItem} The first found list item or null if not found. |
+ * @return {cr.ui.ListItem} The first found list item or null if not found. |
*/ |
getListItem: function(value) { |
var dataModel = this.dataModel; |
@@ -783,7 +782,7 @@ cr.define('cr.ui', function() { |
/** |
* Find the list item element at the given index. |
* @param {number} index The index of the list item to get. |
- * @return {ListItem} The found list item or null if not found. |
+ * @return {cr.ui.ListItem} The found list item or null if not found. |
*/ |
getListItemByIndex: function(index) { |
return this.cachedItems_[index] || null; |
@@ -791,7 +790,7 @@ cr.define('cr.ui', function() { |
/** |
* Find the index of the given list item element. |
- * @param {ListItem} item The list item to get the index of. |
+ * @param {cr.ui.ListItem} item The list item to get the index of. |
* @return {number} The index of the list item, or -1 if not found. |
*/ |
getIndexOfListItem: function(item) { |
@@ -805,7 +804,7 @@ cr.define('cr.ui', function() { |
/** |
* Creates a new list item. |
* @param {*} value The value to use for the item. |
- * @return {!ListItem} The newly created list item. |
+ * @return {!cr.ui.ListItem} The newly created list item. |
*/ |
createItem: function(value) { |
var item = new this.itemConstructor_(value); |
@@ -1159,7 +1158,7 @@ cr.define('cr.ui', function() { |
* updated and restored. Assumed the listItem relates to the same data item |
* as the lead item in the begin of the batch update. |
* |
- * @param {ListItem} leadItem Already existing lead item. |
+ * @param {cr.ui.ListItem} leadItem Already existing lead item. |
*/ |
restoreLeadItem: function(leadItem) { |
delete this.cachedItems_[leadItem.listIndex]; |
@@ -1202,7 +1201,7 @@ cr.define('cr.ui', function() { |
* the visible range). |
* |
* Item returned from this method won't be removed until it remains a lead |
- * item or til the data model changes (unlike other items that could be |
+ * item or till the data model changes (unlike other items that could be |
* removed when they go out of the visible range). |
* |
* @return {cr.ui.ListItem} The lead item for the list. |