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

Unified Diff: chrome/browser/resources/extensions/extension_options_overlay.js

Issue 896283003: extensions: don't animate options dialog when loading. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/extensions/extension_options_overlay.js
diff --git a/chrome/browser/resources/extensions/extension_options_overlay.js b/chrome/browser/resources/extensions/extension_options_overlay.js
index dc1fbeb832c513c9865cbdb6e8e34fa54b0c15be..e51e8c09e7b675411d5e6bac4b039f93bed4d9b1 100644
--- a/chrome/browser/resources/extensions/extension_options_overlay.js
+++ b/chrome/browser/resources/extensions/extension_options_overlay.js
@@ -131,9 +131,10 @@ cr.define('extensions', function() {
// the overlay. It is calculated by multiplying the pythagorean distance
// between old and the new size (in px) with a constant speed of
// 0.25 ms/px.
- var animationTime = 0.25 * Math.sqrt(
- Math.pow(newWidth - oldWidth, 2) +
- Math.pow(newHeight - oldHeight, 2));
+ var loading = document.documentElement.classlist.contains('loading');
+ var animationTime = loading ? 0 :
+ 0.25 * Math.sqrt(Math.pow(newWidth - oldWidth, 2) +
+ Math.pow(newHeight - oldHeight, 2));
if (animation)
animation.cancel();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698