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 7844e4adab8769257ca981a43d67c338d213a4b8..b96f8076f0903bf45c32510a385a217092fbb9b4 100644 |
--- a/chrome/browser/resources/print_preview/search/destination_list.js |
+++ b/chrome/browser/resources/print_preview/search/destination_list.js |
@@ -128,7 +128,10 @@ cr.define('print_preview', function() { |
numItems = Math.min(numItems, this.destinations_.length); |
var headerHeight = |
this.getChildElement('.destination-list > header').offsetHeight; |
- return headerHeight + numItems * DestinationList.HEIGHT_OF_ITEM_; |
+ return headerHeight + (numItems > 0 ? |
+ numItems * DestinationList.HEIGHT_OF_ITEM_ : |
+ // To account for "No destinations found" message. |
+ DestinationList.HEIGHT_OF_ITEM_); |
}, |
/** @param {boolean} isVisible Whether the throbber is visible. */ |