Chromium Code Reviews| 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..2ed6715c2fbdefa7f59c98d40a7b2b9e6da70df5 100644 |
| --- a/chrome/browser/resources/extensions/extension_options_overlay.js |
| +++ b/chrome/browser/resources/extensions/extension_options_overlay.js |
| @@ -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. |
|
not at google - send to devlin
2015/03/18 15:35:20
And I wonder if this should use the width/height o
paulmeyer
2015/03/18 17:37:48
I think the reason that overlayGuest isn't used he
not at google - send to devlin
2015/03/18 19:52:06
Ah, that could be it.
Once again rendering these
paulmeyer
2015/03/18 21:41:46
Yes, 0,0.
I agree, those names are more meaningfu
|
| 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 |