| Index: third_party/WebKit/Source/web/resources/pickerCommon.js
|
| diff --git a/third_party/WebKit/Source/web/resources/pickerCommon.js b/third_party/WebKit/Source/web/resources/pickerCommon.js
|
| index f0051ee9b5e05b5d7e5c334ebfe3ac2f196d49ff..205c8455b0aee6a1e3ea187a63f74cbab22dede0 100644
|
| --- a/third_party/WebKit/Source/web/resources/pickerCommon.js
|
| +++ b/third_party/WebKit/Source/web/resources/pickerCommon.js
|
| @@ -89,19 +89,20 @@ Rectangle.intersection = function(rect1, rect2) {
|
| };
|
|
|
| /**
|
| - * @param {!number} width
|
| - * @param {!number} height
|
| + * @param {!number} width in CSS pixel
|
| + * @param {!number} height in CSS pixel
|
| */
|
| function resizeWindow(width, height) {
|
| - setWindowRect(adjustWindowRect(width, height, width, height));
|
| + var zoom = global.params.zoomFactor ? global.params.zoomFactor : 1;
|
| + setWindowRect(adjustWindowRect(width * zoom, height * zoom, width * zoom, height * zoom));
|
| }
|
|
|
| /**
|
| - * @param {!number} width
|
| - * @param {!number} height
|
| - * @param {?number} minWidth
|
| - * @param {?number} minHeight
|
| - * @return {!Rectangle}
|
| + * @param {!number} width in physical pixel
|
| + * @param {!number} height in physical pixel
|
| + * @param {?number} minWidth in physical pixel
|
| + * @param {?number} minHeight in physical pixel
|
| + * @return {!Rectangle} Adjusted rectangle with physical pixels
|
| */
|
| function adjustWindowRect(width, height, minWidth, minHeight) {
|
| if (typeof minWidth !== "number")
|
| @@ -123,6 +124,9 @@ function adjustWindowRect(width, height, minWidth, minHeight) {
|
| return windowRect;
|
| }
|
|
|
| +/**
|
| + * Arguments are physical pixels.
|
| + */
|
| function _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeight) {
|
| var availableSpaceAbove = anchorRect.y - availRect.y;
|
| availableSpaceAbove = Math.max(0, Math.min(availRect.height, availableSpaceAbove));
|
| @@ -140,6 +144,9 @@ function _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeigh
|
| }
|
| }
|
|
|
| +/**
|
| + * Arguments are physical pixels.
|
| + */
|
| function _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWidth) {
|
| windowRect.width = Math.min(windowRect.width, availRect.width);
|
| windowRect.width = Math.max(windowRect.width, minWidth);
|
| @@ -152,7 +159,7 @@ function _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWid
|
| }
|
|
|
| /**
|
| - * @param {!Rectangle} rect
|
| + * @param {!Rectangle} rect Window position and size with physical pixels.
|
| */
|
| function setWindowRect(rect) {
|
| if (window.frameElement) {
|
|
|