Closed Bug 1831760 Opened 1 year ago Closed 11 months ago

Use a native context menu for the result menu on Mac

Categories

(Firefox :: Address Bar, task, P1)

task

Tracking

()

VERIFIED FIXED
115 Branch
Tracking Status
firefox115 --- verified

People

(Reporter: adw, Assigned: adw)

References

(Blocks 2 open bugs, Regressed 1 open bug)

Details

Attachments

(2 files)

The urlbar result menu is not an OS-native menu. On Mac, the selection and submenu arrow don't look right. It's especially noticeable because of the arrow.

nsXULPopupManager::ShowPopup() doesn't check to see if the popup should be a native popup. However, nsXULPopupManager::ShowPopupAtScreen() does, so if we change resultMenu.openPopup() to resultMenu.openPopupAtScreen() and tell it to use a context menu, we get a nice native menu. That behavior was added in bug 1702041.

I asked mstange about it, and he said:

I didn’t convert the other APIs because I ran out of time
See https://bugzilla.mozilla.org/show_bug.cgi?id=1710459
If openPopup is easy to native-ify, that would be great! I’ve just never looked into it.

The ideal fix would be to modify ShowPopup(), but in the short term (114 -- we're shipping the weather suggestion in 114) I think we should use openPopupAtScreen() instead.

Attachment #9332042 - Attachment description: Bug 1831760 - Use a native context menu for the urlbar result menu. → Bug 1831760 - Use a native popup menu for positioned popups on Mac.
Blocks: 1833390
Pushed by dwillcoxon@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/48223b575381
Use a native popup menu for positioned popups on Mac. r=dao,mstange
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

For QA verification, the urlbar result menu should look like the "Native" image (the one on the right) in comment 0. There shouldn't be any weirdness or jank or anything when using it, it should just behave like a native Mac menu, and it should open under the Feedback button or reasonably close to it when the window is near the edge of the screen.

Flags: qe-verify+
Flags: in-testsuite+
Summary: Use a native context menu for the result menu → Use a native context menu for the result menu on Mac

We have verified this task on the latest Firefox Nightly 115.0a1 (Build ID: 20230518213154) on macOS 12.6.1.

  • The urlbar result menu looks like the "Native" one from comment 0. We also did not experience any visual issues while interacting with it.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1834135
Blocks: 1861950
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: