Index: chrome/browser/resources/print_preview/search/destination_list.js |
diff --git a/chrome/browser/resources/print_preview/search/destination_list.js b/chrome/browser/resources/print_preview/search/destination_list.js |
index a668637e0d0bc994cd9bd8fd24e0e78d825eb166..5d0d6664d91c98aaddaba109b94b030b8f13f303 100644 |
--- a/chrome/browser/resources/print_preview/search/destination_list.js |
+++ b/chrome/browser/resources/print_preview/search/destination_list.js |
@@ -145,10 +145,10 @@ cr.define('print_preview', function() { |
numItems = Math.min(numItems, this.destinations_.length); |
var headerHeight = |
this.getChildElement('.destination-list > header').offsetHeight; |
- return headerHeight + (numItems > 0 ? |
- numItems * DestinationList.HEIGHT_OF_ITEM_ : |
- // To account for "No destinations found" message. |
- DestinationList.HEIGHT_OF_ITEM_); |
+ return headerHeight + |
+ (numItems > 0 ? numItems * DestinationList.HEIGHT_OF_ITEM_ : |
+ // To account for "No destinations found" message. |
+ DestinationList.HEIGHT_OF_ITEM_); |
}, |
/** |
@@ -181,8 +181,8 @@ cr.define('print_preview', function() { |
/** @override */ |
createDom: function() { |
- this.setElementInternal(this.cloneTemplateInternal( |
- 'destination-list-template')); |
+ this.setElementInternal( |
+ this.cloneTemplateInternal('destination-list-template')); |
this.getChildElement('.title').textContent = this.title_; |
if (this.actionLinkLabel_) { |
var actionLinkEl = this.getChildElement('.action-link'); |
@@ -195,12 +195,10 @@ cr.define('print_preview', function() { |
enterDocument: function() { |
print_preview.Component.prototype.enterDocument.call(this); |
this.tracker.add( |
- this.getChildElement('.action-link'), |
- 'click', |
+ this.getChildElement('.action-link'), 'click', |
this.onActionLinkClick_.bind(this)); |
this.tracker.add( |
- this.getChildElement('.show-all-button'), |
- 'click', |
+ this.getChildElement('.show-all-button'), 'click', |
this.setIsShowAll.bind(this, true)); |
}, |
@@ -232,7 +230,8 @@ cr.define('print_preview', function() { |
getDestinationItem: function(destinationId) { |
return this.listItems_.find(function(listItem) { |
return listItem.destination.id == destinationId; |
- }) || null; |
+ }) || |
+ null; |
}, |
/** |
@@ -276,8 +275,9 @@ cr.define('print_preview', function() { |
*/ |
renderDestinationsList_: function(destinations) { |
// Update item counters, footers and other misc controls. |
- setIsVisible(this.getChildElement('.no-destinations-message'), |
- destinations.length == 0); |
+ setIsVisible( |
+ this.getChildElement('.no-destinations-message'), |
+ destinations.length == 0); |
setIsVisible(this.getChildElement('.destination-list > footer'), false); |
var numItems = destinations.length; |
if (destinations.length > this.shortListSize_ && !this.isShowAll_) { |
@@ -309,7 +309,8 @@ cr.define('print_preview', function() { |
// We need to use activeElement instead of :focus selector, which doesn't |
// work in an inactive page. See crbug.com/723579. |
var focusedEl = listEl.contains(document.activeElement) ? |
- document.activeElement : null; |
+ document.activeElement : |
+ null; |
for (var i = 0; i < numItems; i++) { |
var destination = assert(destinations[i]); |
var listItem = visibleListItems[destination.id]; |
@@ -335,8 +336,8 @@ cr.define('print_preview', function() { |
var itemEl = listItem.getElement(); |
// Preserve focused inner element, if there's one. |
- var focusedInnerEl = focusedEl && itemEl.contains(focusedEl) ? |
- focusedEl : null; |
+ var focusedInnerEl = |
+ focusedEl && itemEl.contains(focusedEl) ? focusedEl : null; |
if (focusedEl) |
itemEl.classList.add('moving'); |
// Move it to the end of the list. |
@@ -368,13 +369,11 @@ cr.define('print_preview', function() { |
* @private |
*/ |
onActionLinkClick_: function() { |
- cr.dispatchSimpleEvent(this, |
- DestinationList.EventType.ACTION_LINK_ACTIVATED); |
+ cr.dispatchSimpleEvent( |
+ this, DestinationList.EventType.ACTION_LINK_ACTIVATED); |
} |
}; |
// Export |
- return { |
- DestinationList: DestinationList |
- }; |
+ return {DestinationList: DestinationList}; |
}); |