| 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 593407387c92883cf9af1c2aded9f72705745f02..ea676c705a1137d1cf1f76affe1a41fa3f0c6299 100644
|
| --- a/chrome/browser/resources/extensions/extension_options_overlay.js
|
| +++ b/chrome/browser/resources/extensions/extension_options_overlay.js
|
| @@ -106,7 +106,7 @@ cr.define('extensions', function() {
|
| // maxHeight, but the maxHeight does not include our header height (title
|
| // and close button), so we need to subtract that to get the maxHeight
|
| // for the extension options.
|
| - var maxHeight = parseInt(overlay.style.maxHeight, 10) -
|
| + var maxHeight = parseInt(overlayStyle.maxHeight, 10) -
|
| overlayHeader.offsetHeight;
|
| var minWidth = parseInt(overlayStyle.minWidth, 10);
|
|
|
| @@ -125,8 +125,11 @@ cr.define('extensions', function() {
|
| * @param {{width: number, height: number}} evt
|
| */
|
| extensionoptions.onpreferredsizechanged = function(evt) {
|
| + // |overlayStyle.height| includes the header height, so it needs to be
|
| + // subtracted to get the true old preferred height.
|
| var oldWidth = parseInt(overlayStyle.width, 10);
|
| - var oldHeight = parseInt(overlayStyle.height, 10);
|
| + var oldHeight =
|
| + parseInt(overlayStyle.height, 10) - overlayHeader.offsetHeight;
|
| // The overlay must be slightly larger than the extension options to
|
| // avoid creating scrollbars.
|
| // TODO(paulmeyer): This shouldn't be necessary, but the preferred size
|
| @@ -148,9 +151,13 @@ cr.define('extensions', function() {
|
| if (animation)
|
| animation.cancel();
|
|
|
| + // The header height must be added to the (old and new) preferred
|
| + // heights to get the full overlay heights.
|
| animation = overlay.animate([
|
| - {width: oldWidth + 'px', height: oldHeight + 'px'},
|
| - {width: newWidth + 'px', height: newHeight + 'px'}
|
| + {width: oldWidth + 'px',
|
| + height: (oldHeight + overlayHeader.offsetHeight) + 'px'},
|
| + {width: newWidth + 'px',
|
| + height: (newHeight + overlayHeader.offsetHeight) + 'px'}
|
| ], {
|
| duration: animationTime,
|
| delay: 0
|
|
|