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(); |