summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/resources/new_new_tab.html3
-rw-r--r--chrome/browser/resources/ntp/apps.css4
-rw-r--r--chrome/browser/resources/ntp/apps.js6
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');