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

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: 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 174e16e63cf2ffb05e315595228c149519c6b1fe..cc62605a0ed2e89debd1909004502a107fe1ff5e 100644
--- a/chrome/browser/resources/extensions/extension_options_overlay.js
+++ b/chrome/browser/resources/extensions/extension_options_overlay.js
@@ -121,9 +121,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');
Dan Beam 2015/02/04 19:09:30 note: this doesn't work all that well but will whe
+ 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