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

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

Issue 934303003: Fixed the bug that caused extension options not to fit their overlays properly when zoomed. (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
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 07684a98bef5cbc3f8f0e889039b4c9c808b894e..1e559227dc8cb260ba035d61369a8e289b33df30 100644
--- a/chrome/browser/resources/extensions/extension_options_overlay.js
+++ b/chrome/browser/resources/extensions/extension_options_overlay.js
@@ -127,8 +127,10 @@ cr.define('extensions', function() {
extensionoptions.onpreferredsizechanged = function(evt) {
var oldWidth = parseInt(overlayStyle.width, 10);
var oldHeight = parseInt(overlayStyle.height, 10);
- var newWidth = Math.max(evt.width, minWidth);
- var newHeight = Math.min(evt.height, maxHeight);
+ // The overlay must be slightly larger than the extension options to
+ // avoid creating scrollbars.
+ var newWidth = Math.max(evt.width + 2, minWidth);
not at google - send to devlin 2015/02/18 18:00:12 Could you explain where the value of 2 comes from,
paulmeyer 2015/02/18 18:14:11 2 pixels allows the overlay a 1 pixel border aroun
not at google - send to devlin 2015/02/18 19:19:10 Ok, thanks for explaining. Why is the pixel neede
paulmeyer 2015/02/19 18:42:58 It looks like there is a problem with the preferre
+ var newHeight = Math.min(evt.height + 2, maxHeight);
// animationTime is the amount of time in ms that will be used to resize
// the overlay. It is calculated by multiplying the pythagorean distance

Powered by Google App Engine
This is Rietveld 408576698