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

Side by Side Diff: chrome/browser/resources/extensions/extension_options_overlay.js

Issue 899163007: extension: fix typo that breaks showing extension options dialog. (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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_browsertest.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 cr.define('extensions', function() { 5 cr.define('extensions', function() {
6 'use strict'; 6 'use strict';
7 7
8 /** 8 /**
9 * The ExtensionOptionsOverlay will show an extension's options page using 9 * The ExtensionOptionsOverlay will show an extension's options page using
10 * an <extensionoptions> element. 10 * an <extensionoptions> element.
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 extensionoptions.onpreferredsizechanged = function(evt) { 124 extensionoptions.onpreferredsizechanged = function(evt) {
125 var oldWidth = parseInt(overlayStyle.width, 10); 125 var oldWidth = parseInt(overlayStyle.width, 10);
126 var oldHeight = parseInt(overlayStyle.height, 10); 126 var oldHeight = parseInt(overlayStyle.height, 10);
127 var newWidth = Math.max(evt.width, minWidth); 127 var newWidth = Math.max(evt.width, minWidth);
128 var newHeight = Math.min(evt.height, maxHeight); 128 var newHeight = Math.min(evt.height, maxHeight);
129 129
130 // animationTime is the amount of time in ms that will be used to resize 130 // animationTime is the amount of time in ms that will be used to resize
131 // the overlay. It is calculated by multiplying the pythagorean distance 131 // the overlay. It is calculated by multiplying the pythagorean distance
132 // between old and the new size (in px) with a constant speed of 132 // between old and the new size (in px) with a constant speed of
133 // 0.25 ms/px. 133 // 0.25 ms/px.
134 var loading = document.documentElement.classlist.contains('loading'); 134 var loading = document.documentElement.classList.contains('loading');
Dan Beam 2015/02/05 20:33:35 dammit
135 var animationTime = loading ? 0 : 135 var animationTime = loading ? 0 :
136 0.25 * Math.sqrt(Math.pow(newWidth - oldWidth, 2) + 136 0.25 * Math.sqrt(Math.pow(newWidth - oldWidth, 2) +
137 Math.pow(newHeight - oldHeight, 2)); 137 Math.pow(newHeight - oldHeight, 2));
138 138
139 if (animation) 139 if (animation)
140 animation.cancel(); 140 animation.cancel();
141 141
142 animation = overlay.animate([ 142 animation = overlay.animate([
143 {width: oldWidth + 'px', height: oldHeight + 'px'}, 143 {width: oldWidth + 'px', height: oldHeight + 'px'},
144 {width: newWidth + 'px', height: newHeight + 'px'} 144 {width: newWidth + 'px', height: newHeight + 'px'}
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 /** @type {HTMLDivElement} */($('extension-options-overlay')) : 190 /** @type {HTMLDivElement} */($('extension-options-overlay')) :
191 null); 191 null);
192 } 192 }
193 }; 193 };
194 194
195 // Export 195 // Export
196 return { 196 return {
197 ExtensionOptionsOverlay: ExtensionOptionsOverlay 197 ExtensionOptionsOverlay: ExtensionOptionsOverlay
198 }; 198 };
199 }); 199 });
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/extensions/extension_settings_browsertest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698