Closed Bug 1784287 Opened 2 years ago Closed 2 years ago

Account for input margins rather than negative margins to expand available screen area.

Categories

(Core :: Layout: Form Controls, task)

task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: emilio, Assigned: emilio)

References

Details

Attachments

(1 file)

This is a follow-up to bug 1783500. The existing expansion for the screen area works great on Windows and Linux, but on macOS it can conceptually cause a menulist to go off-screen, because of this margin:

https://searchfox.org/mozilla-central/rev/f655bdf6b4bf01b42609750ab94fc37635397260/toolkit/themes/osx/global/popup.css#85

Instead we should do the same as that bug did, and use the input-region-margin, which is the amount of space that has no content (that is, that contains the shadow and so on).

This is a follow-up to bug 1783500. The existing expansion for the
screen area works great on Windows and so on, but on macOS it can
conceptually cause a menulist to go off-screen, because of this margin
used to move menulists to the left:

https://searchfox.org/mozilla-central/rev/f655bdf6b4bf01b42609750ab94fc37635397260/toolkit/themes/osx/global/popup.css#85

Instead we should do the same as that bug did, and use the
input-region-margin, which is the amount of space that has no content
(that is, that contains the shadow and so on) and is zero on macOS
(because shadows on macOS are drawn by the OS unlike on Windows /
Linux).

This required extra test changes so it was worth getting it reviewed
separately.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cc9ac78aac71
Use input margin for screen size expansion. r=tnikkel

Backed out for causing mochitest-chrome failures on test_largemenu.html.

Push with failures

Failure log

Backout link

[task 2022-08-11T19:34:34.868Z] 19:34:34     INFO - TEST-PASS | toolkit/content/tests/chrome/test_largemenu.html | panel movement top is set after moving 
[task 2022-08-11T19:34:34.868Z] 19:34:34     INFO - Buffered messages finished
[task 2022-08-11T19:34:34.870Z] 19:34:34     INFO - TEST-UNEXPECTED-FAIL | toolkit/content/tests/chrome/test_largemenu.html | panel movement move after set left and top x to -1 - got -1, expected +0
[task 2022-08-11T19:34:34.870Z] 19:34:34     INFO - SimpleTest.is@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:497:14
[task 2022-08-11T19:34:34.870Z] 19:34:34     INFO - is@chrome://mochitests/content/chrome/toolkit/content/tests/chrome/window_largemenu.xhtml:167:55
[task 2022-08-11T19:34:34.871Z] 19:34:34     INFO - testPopupMovement@chrome://mochitests/content/chrome/toolkit/content/tests/chrome/window_largemenu.xhtml:393:5
[task 2022-08-11T19:34:34.871Z] 19:34:34     INFO - onpopupshown@chrome://mochitests/content/chrome/toolkit/content/tests/chrome/window_largemenu.xhtml:1:1
[task 2022-08-11T19:34:34.872Z] 19:34:34     INFO - Not taking screenshot here: see the one that was previously logged
[task 2022-08-11T19:34:34.873Z] 19:34:34     INFO - TEST-UNEXPECTED-FAIL | toolkit/content/tests/chrome/test_largemenu.html | panel movement move after set left and top y to -1 - got -1, expected +0
[task 2022-08-11T19:34:34.873Z] 19:34:34     INFO - SimpleTest.is@chrome://mochikit/content/tests/SimpleTest/SimpleTest.js:497:14
[task 2022-08-11T19:34:34.875Z] 19:34:34     INFO - is@chrome://mochitests/content/chrome/toolkit/content/tests/chrome/window_largemenu.xhtml:167:55
[task 2022-08-11T19:34:34.875Z] 19:34:34     INFO - testPopupMovement@chrome://mochitests/content/chrome/toolkit/content/tests/chrome/window_largemenu.xhtml:394:5
[task 2022-08-11T19:34:34.876Z] 19:34:34     INFO - onpopupshown@chrome://mochitests/content/chrome/toolkit/content/tests/chrome/window_largemenu.xhtml:1:1
[task 2022-08-11T19:34:34.877Z] 19:34:34     INFO - TEST-PASS | toolkit/content/tests/chrome/test_largemenu.html | panel movement left is not set after moving to -1 
Flags: needinfo?(emilio)
Attachment #9289468 - Attachment description: Bug 1784287 - Use input margin for screen size expansion. r=tnikkel,NeilDeakin → Bug 1784287 - Use input margin for screen size expansion. r=tnikkel
Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/8e225be30ad2
Use input margin for screen size expansion. r=tnikkel
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
Regressions: 1784380
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: