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

Unified Diff: Source/web/resources/pickerCommon.js

Issue 1087743002: Support multiple displays for PagePopup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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: 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);
}
}
« Source/core/page/PagePopupController.idl ('K') | « Source/web/WebPagePopupImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698