Closed Bug 1691213 Opened 3 years ago Closed 3 years ago

Some cleanup in native menu code, round 1

Categories

(Core :: Widget: Cocoa, task, P5)

All
macOS
task

Tracking

()

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Whiteboard: [proton-context-menus][mac:mr1])

Attachments

(6 files)

No description provided.

The only behavior difference (skipping the app menu) is now a boolean parameter.

Depends on D104312

ignore-this-changeset

This patch was automatically generated by running
~/.mozbuild/clang-tools/clang-tidy/bin/clang-tidy widget/cocoa/nsMenu*.mm widget/cocoa/nsStandaloneNativeMenu.mm -fix -checks="readability-braces-around-statements" -p /Users/mstange/code/obj-m-opt/clangd/

Depends on D104314

This patch was generated automatically, using the command
~/.mozbuild/clang-tools/clang-tidy/bin/clang-tidy widget/cocoa/nsMenu*.mm widget/cocoa/nsStandaloneNativeMenu.mm -fix -checks="readability-else-after-return,modernize-use-nullptr" -p /Users/mstange/code/obj-m-opt/clangd/

(and running it repeatedly until the entire if/return/else chain in nsMenuBarX.mm was handled)

Depends on D104315

Blocks: 1691861
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/0cb9be29e060
DeCOMtaminate nsINativeMenuService and rename it to mozilla::widget::NativeMenuSupport. r=spohl
https://hg.mozilla.org/integration/autoland/rev/87c34a78967e
Remove unused method nsMenuBarX::GetLocalizedAccelKey. r=spohl
https://hg.mozilla.org/integration/autoland/rev/c4ee687e96d5
Share mostly-duplicated function NativeMenuItemWithLocation. r=spohl
https://hg.mozilla.org/integration/autoland/rev/a449e225c1d0
Add missing dom:: namespace annotations in nsMenuItemX.mm. r=spohl
https://hg.mozilla.org/integration/autoland/rev/6d5803bffccb
Add missing braces in cocoa menu code. r=spohl
https://hg.mozilla.org/integration/autoland/rev/1ff6cfdadceb
Apply 'readability-else-after-return' and 'modernize-use-nullptr' clang-tidy fixes to native menu code. r=spohl
Blocks: 1694853
Whiteboard: [proton-context-menus][mac:mr1]

All references to "@mozilla.org/widget/nativemenuservice;1" were removed in https://hg.mozilla.org/mozilla-central/rev/0cb9be29e060 except for one, in browser/base/content/browser-menubar.inc. This is probably an oversight?

Blocks: 1695873

(In reply to Olivier Tilloy from comment #9)

All references to "@mozilla.org/widget/nativemenuservice;1" were removed in https://hg.mozilla.org/mozilla-central/rev/0cb9be29e060 except for one, in browser/base/content/browser-menubar.inc. This is probably an oversight?

Thanks for noticing. Looks like https://searchfox.org/mozilla-central/rev/3f97afc8db535f9b0232222cb48cc4cbf8334c76/widget/nsWidgetsCID.h#69-76 is also dead now. I filed bug 1695873.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: