Index: chrome/browser/resources/ntp_search/new_tab.js |
diff --git a/chrome/browser/resources/ntp_search/new_tab.js b/chrome/browser/resources/ntp_search/new_tab.js |
index 1bb34ebebfc5f2462c14081cfd92492df0e3c5a3..070cf32cdf61f17e8c9abed2950e541c4d86eb4f 100644 |
--- a/chrome/browser/resources/ntp_search/new_tab.js |
+++ b/chrome/browser/resources/ntp_search/new_tab.js |
@@ -132,13 +132,6 @@ cr.define('ntp', function() { |
var headerHeight; |
/** |
- * The height of the Bottom Panel Footer, in pixels. |
- * @type {number|undefined} |
- * @private |
- */ |
- var footerHeight; |
- |
- /** |
* The time in milliseconds for most transitions. This should match what's |
* in new_tab.css. Unfortunately there's no better way to try to time |
* something to occur until after a transition has completed. |
@@ -736,9 +729,8 @@ cr.define('ntp', function() { |
var contentHeight = TILE_ROW_HEIGHT; |
if (!opt_page && currentPage.config.scrollable) { |
contentHeight = viewHeight - bottomPanelOffsetTop - |
- headerHeight - footerHeight; |
+ headerHeight - $('bottom-panel-footer').offsetHeight; |
contentHeight = Math.max(TILE_ROW_HEIGHT, contentHeight); |
- contentHeight = Math.min(2 * TILE_ROW_HEIGHT, contentHeight); |
} |
this.contentHeight_ = contentHeight; |
@@ -808,7 +800,6 @@ cr.define('ntp', function() { |
bottomPanelOffsetTop = $('bottom-panel').offsetTop; |
headerHeight = $('bottom-panel-header').offsetHeight; |
- footerHeight = $('bottom-panel-footer').offsetHeight; |
notificationContainer = getRequiredElement('notification-container'); |
notificationContainer.addEventListener( |
@@ -1012,6 +1003,8 @@ cr.define('ntp', function() { |
var timeout = opt_timeout || 10000; |
notificationTimeout = window.setTimeout(hideNotification, timeout); |
+ |
+ layout(); |
} |
/** |
@@ -1019,6 +1012,8 @@ cr.define('ntp', function() { |
*/ |
function hideNotification() { |
notificationContainer.classList.add('inactive'); |
+ |
+ layout(); |
} |
/** |
@@ -1104,8 +1099,8 @@ cr.define('ntp', function() { |
newTabView.highlightAppId = appId; |
} |
- function layout(opt_animate) { |
- newTabView.layout(opt_animate); |
+ function layout() { |
+ newTabView.layout.apply(newTabView, arguments); |
} |
function getContentHeight() { |