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

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: Addressed comments. 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 | extensions/browser/guest_view/extension_options/extension_options_guest.cc » ('j') | 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 07684a98bef5cbc3f8f0e889039b4c9c808b894e..593407387c92883cf9af1c2aded9f72705745f02 100644
--- a/chrome/browser/resources/extensions/extension_options_overlay.js
+++ b/chrome/browser/resources/extensions/extension_options_overlay.js
@@ -127,8 +127,14 @@ 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.
+ // TODO(paulmeyer): This shouldn't be necessary, but the preferred size
+ // (coming from Blink) seems to be too small for some zoom levels. The
+ // 2-pixel addition should be removed once this problem is investigated
+ // and corrected.
+ var newWidth = Math.max(evt.width + 2, minWidth);
+ 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
« no previous file with comments | « no previous file | extensions/browser/guest_view/extension_options/extension_options_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698