Bug 1695873 - remove nativemenuservice remnants and fix macOS openedwithkey attribute use, r=mak,mstange

Although 11 years ago feature-checking for native menus made sense, right now we do not
expect any other OSes to implement native menus, and macOS' behaviour is currently not
quite right because we stopped exposing the relevant XPCOM component.

The change in browser-menubar.inc fixes macOS behaviour. The nsWidgetsCID.h change
is just clean-up.

Differential Revision: https://phabricator.services.mozilla.com/D106962
This commit is contained in:
Gijs Kruitbosch 2021-03-04 22:54:23 +00:00
Родитель e436c531e6
Коммит 664ab77972
2 изменённых файлов: 7 добавлений и 11 удалений

Просмотреть файл

@ -4,10 +4,14 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<menubar id="main-menubar"
onpopupshowing="if (event.target.parentNode.parentNode == this &amp;&amp;
!('@mozilla.org/widget/nativemenuservice;1' in Cc))
# On macOS, we don't track whether activation of the native menubar happened
# with the keyboard.
#ifndef XP_MACOSX
onpopupshowing="if (event.target.parentNode.parentNode == this)
this.setAttribute('openedwithkey',
event.target.parentNode.openedWithKey);">
event.target.parentNode.openedWithKey);"
#endif
>
<menu id="file-menu" data-l10n-id="menu-file">
<menupopup id="menu_FilePopup"
onpopupshowing="updateFileMenuUserContextUIVisibility('menu_newUserContext');

Просмотреть файл

@ -66,14 +66,6 @@
// Menus
//-----------------------------------------------------------
// {0B3FE5AA-BC72-4303-85AE-76365DF1251D}
#define NS_NATIVEMENUSERVICE_CID \
{ \
0x0B3FE5AA, 0xBC72, 0x4303, { \
0x85, 0xAE, 0x76, 0x36, 0x5D, 0xF1, 0x25, 0x1D \
} \
}
// {F6CD4F21-53AF-11d2-8DC4-00609703C14E}
#define NS_POPUPMENU_CID \
{ \