summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/html/forms/resources/pickerCommon.js
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/html/forms/resources/pickerCommon.js')
-rw-r--r--chromium/third_party/blink/renderer/core/html/forms/resources/pickerCommon.js19
1 files changed, 1 insertions, 18 deletions
diff --git a/chromium/third_party/blink/renderer/core/html/forms/resources/pickerCommon.js b/chromium/third_party/blink/renderer/core/html/forms/resources/pickerCommon.js
index ae3504dd303..b72800b4e0b 100644
--- a/chromium/third_party/blink/renderer/core/html/forms/resources/pickerCommon.js
+++ b/chromium/third_party/blink/renderer/core/html/forms/resources/pickerCommon.js
@@ -148,13 +148,7 @@ function _adjustWindowRectVertically(
availableSpaceBelow =
Math.max(0, Math.min(availRect.height, availableSpaceBelow));
- // In some situations, there may be no space available. This can happen on
- // Linux when using a buggy window manager (https://crbug.com/774232). When
- // this happens, don't try to constrain the window at all.
- if (availableSpaceAbove == 0 && availableSpaceBelow == 0) {
- windowRect.height = Math.max(minHeight, windowRect.height);
- windowRect.y = anchorRect.maxY;
- } else if (
+ if (
windowRect.height > availableSpaceBelow &&
availableSpaceBelow < availableSpaceAbove) {
windowRect.height = Math.min(windowRect.height, availableSpaceAbove);
@@ -172,11 +166,6 @@ function _adjustWindowRectVertically(
*/
function _adjustWindowRectHorizontally(
windowRect, availRect, anchorRect, minWidth) {
- if (anchorRect.maxX <= availRect.x || availRect.maxX <= anchorRect.x) {
- windowRect.width = Math.max(minWidth, windowRect.width);
- windowRect.x = anchorRect.x
- return;
- }
windowRect.width = Math.min(windowRect.width, availRect.width);
windowRect.width = Math.max(windowRect.width, minWidth);
windowRect.x = anchorRect.x;
@@ -331,7 +320,6 @@ Picker.prototype = Object.create(EventEmitter.prototype);
Picker.Actions = {
SetValue: 0,
Cancel: -1,
- ChooseOtherColor: -2
};
/**
@@ -346,11 +334,6 @@ Picker.prototype.handleCancel = function() {
window.pagePopupController.closePopup();
};
-Picker.prototype.chooseOtherColor = function() {
- window.pagePopupController.setValueAndClosePopup(
- Picker.Actions.ChooseOtherColor, '');
-};
-
Picker.prototype.cleanup = function() {};
window.addEventListener('keyup', function(event) {