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

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

Issue 12038090: Layout the NTP footer with flexboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move separator out of webstore link Created 7 years, 10 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
Index: chrome/browser/resources/ntp4/new_tab.js
diff --git a/chrome/browser/resources/ntp4/new_tab.js b/chrome/browser/resources/ntp4/new_tab.js
index 5442bbd1b734aaef4f2d4b6f0b94abba6dc0ce39..e6b7b546b34128a4a44059b85cfd6d097a78589d 100644
--- a/chrome/browser/resources/ntp4/new_tab.js
+++ b/chrome/browser/resources/ntp4/new_tab.js
@@ -128,6 +128,7 @@ cr.define('ntp', function() {
if (loadTimeData.getBoolean('isDiscoveryInNTPEnabled'))
sectionsToWaitFor++;
measureNavDots();
+ layoutFooter();
// Load the current theme colors.
themeChanged();
@@ -336,6 +337,16 @@ cr.define('ntp', function() {
document.querySelector('head').appendChild(styleElement);
}
+ /**
+ * Layout the footer so that the nav dots stay centered.
+ */
+ function layoutFooter() {
+ var menu = $('footer-menu-container');
+ var logo = $('logo-img');
+ if (menu.clientWidth > logo.clientWidth)
+ logo.style.width = menu.clientWidth + 'px';
+ }
+
function themeChanged(opt_hasAttribution) {
$('themecss').href = 'chrome://theme/css/new_tab_theme.css?' + Date.now();

Powered by Google App Engine
This is Rietveld 408576698