From 1e6b480fd87cb95ddb217dc734984589ca6f87af Mon Sep 17 00:00:00 2001 From: "arv@chromium.org" Date: Thu, 21 Oct 2010 17:41:19 +0000 Subject: [PATCH] NTP: Fix layout flicker due to login header. Also, simplify the CSS and markup and make it RTL aware. BUG=60072 TEST=Login to sync and your user name should show up on the NTP. Review URL: http://codereview.chromium.org/4018005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63374 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/resources/new_new_tab.css | 10 ++++------ chrome/browser/resources/new_new_tab.html | 6 ++---- chrome/browser/resources/new_new_tab.js | 3 ++- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/chrome/browser/resources/new_new_tab.css b/chrome/browser/resources/new_new_tab.css index 9d271ec297fcdf..98b0b5c1cbc371 100644 --- a/chrome/browser/resources/new_new_tab.css +++ b/chrome/browser/resources/new_new_tab.css @@ -29,7 +29,6 @@ body.loading #main { } #main, -#login-container, .section, .maxiview { width: 920px; @@ -281,11 +280,10 @@ html[anim=true][enable-section-animations=true] .section { } #login-container { - position: relative; -} -#login { - position: absolute; - right: 0; + display: none; + height: 0; /* This should not take any vertical space and this simpler than + position absolute which changes the width to intrinsic */ + text-align: end; } .section.disabled, diff --git a/chrome/browser/resources/new_new_tab.html b/chrome/browser/resources/new_new_tab.html index e94bf7bc2503eb..302e3dbf1b40ad 100644 --- a/chrome/browser/resources/new_new_tab.html +++ b/chrome/browser/resources/new_new_tab.html @@ -131,10 +131,8 @@ -
-
- -
+
+
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js index 43f5f482fce78f..524dbeaaa23f02 100644 --- a/chrome/browser/resources/new_new_tab.js +++ b/chrome/browser/resources/new_new_tab.js @@ -1064,9 +1064,10 @@ function initializeLogin() { } function updateLogin(login) { + $('login-container').style.display = login ? 'block' : ''; if (login) $('login-username').textContent = login; - $('login').style.display = login ? 'block' : 'none'; + } var mostVisited = new MostVisited(