Chromium Code Reviews| Index: Source/web/resources/pickerCommon.js |
| diff --git a/Source/web/resources/pickerCommon.js b/Source/web/resources/pickerCommon.js |
| index 22cd331b180fd39162012b1456f79303d72593a3..db9f59ea1d9616ccdf61346f9a69883240511a5e 100644 |
| --- a/Source/web/resources/pickerCommon.js |
| +++ b/Source/web/resources/pickerCommon.js |
| @@ -129,18 +129,15 @@ function _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeigh |
| var availableSpaceBelow = availRect.maxY - anchorRect.maxY; |
| availableSpaceBelow = Math.max(0, Math.min(availRect.height, availableSpaceBelow)); |
| - |
| if (windowRect.height > availableSpaceBelow && availableSpaceBelow < availableSpaceAbove) { |
| windowRect.height = Math.min(windowRect.height, availableSpaceAbove); |
| windowRect.height = Math.max(windowRect.height, minHeight); |
| windowRect.y = anchorRect.y - windowRect.height; |
| - } else { |
| + } else {console.log("awrv2"); |
|
tkent
2015/04/14 11:09:33
remove this change
keishi
2015/04/14 11:17:45
Done.
|
| windowRect.height = Math.min(windowRect.height, availableSpaceBelow); |
| windowRect.height = Math.max(windowRect.height, minHeight); |
| windowRect.y = anchorRect.maxY; |
| } |
| - windowRect.y = Math.min(windowRect.y, availRect.maxY - windowRect.height); |
| - windowRect.y = Math.max(windowRect.y, availRect.y); |
| } |
| function _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWidth) { |
| @@ -149,8 +146,6 @@ function _adjustWindowRectHorizontally(windowRect, availRect, anchorRect, minWid |
| windowRect.x = anchorRect.x; |
| if (global.params.isRTL) |
| windowRect.x += anchorRect.width - windowRect.width; |
| - windowRect.x = Math.min(windowRect.x, availRect.maxX - windowRect.width); |
| - windowRect.x = Math.max(windowRect.x, availRect.x); |
| } |
| /** |
| @@ -161,13 +156,7 @@ function setWindowRect(rect) { |
| window.frameElement.style.width = rect.width + "px"; |
| window.frameElement.style.height = rect.height + "px"; |
| } else { |
| - if (isWindowHidden()) { |
| - window.moveTo(rect.x, rect.y); |
| - window.resizeTo(rect.width, rect.height); |
| - } else { |
| - window.resizeTo(rect.width, rect.height); |
| - window.moveTo(rect.x, rect.y); |
| - } |
| + window.pagePopupController.setWindowRect(rect.x, rect.y, rect.width, rect.height); |
| } |
| } |