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

Unified Diff: chrome/browser/resources/ntp_search/new_tab.js

Issue 11564026: NTP5: Making Apps page taller. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing Dan's comments Created 8 years 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/ntp_search/new_tab.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..38039215bced0ad63ba41532fdddb711121a5b53 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,11 +800,8 @@ cr.define('ntp', function() {
bottomPanelOffsetTop = $('bottom-panel').offsetTop;
headerHeight = $('bottom-panel-header').offsetHeight;
- footerHeight = $('bottom-panel-footer').offsetHeight;
notificationContainer = getRequiredElement('notification-container');
- notificationContainer.addEventListener(
- 'webkitTransitionEnd', onNotificationTransitionEnd);
var mostVisited = new ntp.MostVisitedPage();
newTabView.appendTilePage(mostVisited,
@@ -1005,30 +994,23 @@ cr.define('ntp', function() {
document.querySelector('#notification button').onclick = closeFunc;
document.addEventListener('dragstart', closeFunc);
- notificationContainer.hidden = false;
window.setTimeout(function() {
Dan Beam 2012/12/14 05:52:32 the setTimeout is no longer needed (was just there
pedro (no code reviews) 2012/12/14 06:12:06 Oh, okay, now I see what you were saying. The setT
- notificationContainer.classList.remove('inactive');
+ notificationContainer.hidden = false;
}, 0);
var timeout = opt_timeout || 10000;
notificationTimeout = window.setTimeout(hideNotification, timeout);
+
+ layout();
}
/**
* Hide the notification bubble.
*/
function hideNotification() {
- notificationContainer.classList.add('inactive');
- }
+ notificationContainer.hidden = true;
- /**
- * When done fading out, set hidden to true so the notification can't be
- * tabbed to or clicked.
- * @param {Event} e The webkitTransitionEnd event.
- */
- function onNotificationTransitionEnd(e) {
- if (notificationContainer.classList.contains('inactive'))
- notificationContainer.hidden = true;
+ layout();
}
function setMostVisitedPages(dataList, hasBlacklistedUrls) {
@@ -1104,8 +1086,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() {
« no previous file with comments | « chrome/browser/resources/ntp_search/new_tab.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698