diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-24 00:49:36 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-24 00:49:36 +0000 |
commit | 92464e9acbc960e08355d5983560de04a939c1f2 (patch) | |
tree | 7d33131862cf11503bc2dc2a49da94921297a633 /chrome/browser | |
parent | 463cabc6bb7179a9cbde1184c65e0f2c5d255973 (diff) | |
download | chromium_src-92464e9acbc960e08355d5983560de04a939c1f2.zip chromium_src-92464e9acbc960e08355d5983560de04a939c1f2.tar.gz chromium_src-92464e9acbc960e08355d5983560de04a939c1f2.tar.bz2 |
Fix bug where install animation would replay if something on the
same page was uninstalled.
BUG=56454
TEST=Install one app, then another. Uninstall the first one.
Second one's install animation should not replay.
Review URL: http://codereview.chromium.org/3396021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60391 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/resources/new_new_tab.html | 3 | ||||
-rw-r--r-- | chrome/browser/resources/ntp/apps.css | 4 | ||||
-rw-r--r-- | chrome/browser/resources/ntp/apps.js | 6 |
3 files changed, 10 insertions, 3 deletions
diff --git a/chrome/browser/resources/new_new_tab.html b/chrome/browser/resources/new_new_tab.html index e306dd8..23e8e24 100644 --- a/chrome/browser/resources/new_new_tab.html +++ b/chrome/browser/resources/new_new_tab.html @@ -5,7 +5,8 @@ hasattribution:hasattribution; anim:anim; syncispresent:syncispresent; - customlogo:customlogo"> + customlogo:customlogo" + install-animation-enabled="true"> <head> <meta charset="utf-8"> <title i18n-content="title"></title> diff --git a/chrome/browser/resources/ntp/apps.css b/chrome/browser/resources/ntp/apps.css index 58f544a..a199154 100644 --- a/chrome/browser/resources/ntp/apps.css +++ b/chrome/browser/resources/ntp/apps.css @@ -81,11 +81,11 @@ } } -.app[new=new] { +html[install-animation-enabled=true] .app[new=new] { opacity: 0; } -.app[new=installed] { +html[install-animation-enabled=true] .app[new=installed] { -webkit-animation: bounce .5s ease-in-out; -webkit-transition: opacity .5s; } diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js index 057ca6a..d9098d5 100644 --- a/chrome/browser/resources/ntp/apps.js +++ b/chrome/browser/resources/ntp/apps.js @@ -165,6 +165,12 @@ var apps = (function() { }, 500); div.addEventListener('webkitAnimationEnd', function(e) { div.removeAttribute('new'); + + // If we get new data (eg because something installs in another tab, + // or because we uninstall something here), don't run the install + // animation again. + document.documentElement.setAttribute("install-animation-enabled", + "false"); }); if ($('apps').classList.contains('hidden')) toggleSectionVisibilityAndAnimate('APPS'); |