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

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: Created 7 years, 11 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 2a6c63bc4ed55e958f4d526b4b40df80bfe9f47f..c9fa32fc2351a04952e01486563b80a3fb54c2ed 100644
--- a/chrome/browser/resources/ntp4/new_tab.js
+++ b/chrome/browser/resources/ntp4/new_tab.js
@@ -126,6 +126,7 @@ cr.define('ntp', function() {
if (loadTimeData.getBoolean('isDiscoveryInNTPEnabled'))
sectionsToWaitFor++;
measureNavDots();
+ layoutFooter();
// Load the current theme colors.
themeChanged();
@@ -334,6 +335,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';
Dan Beam 2013/01/31 20:22:11 this shouldn't be necessary and can be done in CSS
dconnelly 2013/02/01 14:34:14 Continuing from the previous comment, even with th
+ }
+
function themeChanged(opt_hasAttribution) {
$('themecss').href = 'chrome://theme/css/new_tab_theme.css?' + Date.now();

Powered by Google App Engine
This is Rietveld 408576698