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

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: fixed IntRect inclusion 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
« no previous file with comments | « Source/web/WebPagePopupImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/resources/pickerCommon.js
diff --git a/Source/web/resources/pickerCommon.js b/Source/web/resources/pickerCommon.js
index 22cd331b180fd39162012b1456f79303d72593a3..4b1e86a884def2dcff0586ba6e1f83d60e96b7b1 100644
--- a/Source/web/resources/pickerCommon.js
+++ b/Source/web/resources/pickerCommon.js
@@ -129,7 +129,6 @@ 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);
@@ -139,8 +138,6 @@ function _adjustWindowRectVertically(windowRect, availRect, anchorRect, minHeigh
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);
}
}
« no previous file with comments | « Source/web/WebPagePopupImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698