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

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

Issue 7399015: Sync Promo: Add a way to collapse the sync promo (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync Promo: Add a way to collapse the sync promo Created 9 years, 5 months 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/new_tab.html ('k') | chrome/browser/resources/new_tab_sync_promo.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/new_tab.js
===================================================================
--- chrome/browser/resources/new_tab.js (revision 93571)
+++ chrome/browser/resources/new_tab.js (working copy)
@@ -488,6 +488,10 @@
}
}
+ // Include the height of the sync promo bar.
+ var sync_promo_height = $('sync-promo').offsetHeight;
+ headerHeight += sync_promo_height;
+
// Calculate the height of the fixed elements below the expanded section, if
// any.
for (; section = sections[i]; i++) {
@@ -535,7 +539,7 @@
maxiviewVisibleHeight = expandedSectionHeight;
// Now position all the elements.
- var y = LAYOUT_SPACING_TOP;
+ var y = LAYOUT_SPACING_TOP + sync_promo_height;
for (i = 0, section; section = sections[i]; i++) {
section.section.style.top = y + 'px';
y += section.fixedHeight;
@@ -563,6 +567,9 @@
if (cr.isChromeOS)
$('closed-sections-bar').style.top = y + 'px';
+ // Position the notification container below the sync promo.
+ $('notification-container').style.top = sync_promo_height + 'px';
+
updateMenuSections();
updateAttributionDisplay(y);
}
« no previous file with comments | « chrome/browser/resources/new_tab.html ('k') | chrome/browser/resources/new_tab_sync_promo.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698