зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1503600 - Reorder "Manage Extension" and "Remove Extension" in browserAction context menu. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D10382 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
41eda0ff97
Коммит
d57ad11213
|
@ -6315,8 +6315,8 @@ var ToolbarContextMenu = {
|
|||
|
||||
updateExtension(popup) {
|
||||
let removeExtension = popup.querySelector(".customize-context-removeExtension");
|
||||
let manageExtension = removeExtension.nextElementSibling;
|
||||
let separator = manageExtension.nextElementSibling;
|
||||
let manageExtension = popup.querySelector(".customize-context-manageExtension");
|
||||
let separator = removeExtension.nextElementSibling;
|
||||
let node = this._getUnwrappedTriggerNode(popup);
|
||||
let isWebExt = node && node.hasAttribute("data-extensionid");
|
||||
removeExtension.hidden = manageExtension.hidden = separator.hidden = !isWebExt;
|
||||
|
|
|
@ -421,16 +421,16 @@ xmlns="http://www.w3.org/1999/xhtml"
|
|||
|
||||
<menupopup id="toolbar-context-menu"
|
||||
onpopupshowing="onViewToolbarsPopupShowing(event, document.getElementById('viewToolbarsMenuSeparator')); ToolbarContextMenu.updateDownloadsAutoHide(this); ToolbarContextMenu.updateExtension(this)">
|
||||
<menuitem oncommand="ToolbarContextMenu.removeExtensionForContextAction(this.parentElement)"
|
||||
accesskey="&customizeMenu.removeExtension.accesskey;"
|
||||
label="&customizeMenu.removeExtension.label;"
|
||||
contexttype="toolbaritem"
|
||||
class="customize-context-removeExtension"/>
|
||||
<menuitem oncommand="ToolbarContextMenu.openAboutAddonsForContextAction(this.parentElement)"
|
||||
accesskey="&customizeMenu.manageExtension.accesskey;"
|
||||
label="&customizeMenu.manageExtension.label;"
|
||||
contexttype="toolbaritem"
|
||||
class="customize-context-manageExtension"/>
|
||||
<menuitem oncommand="ToolbarContextMenu.removeExtensionForContextAction(this.parentElement)"
|
||||
accesskey="&customizeMenu.removeExtension.accesskey;"
|
||||
label="&customizeMenu.removeExtension.label;"
|
||||
contexttype="toolbaritem"
|
||||
class="customize-context-removeExtension"/>
|
||||
<menuseparator/>
|
||||
<menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
|
||||
accesskey="&customizeMenu.pinToOverflowMenu.accesskey;"
|
||||
|
|
|
@ -30,16 +30,16 @@
|
|||
-->
|
||||
<menupopup id="customizationPanelItemContextMenu"
|
||||
onpopupshowing="gCustomizeMode.onPanelContextMenuShowing(event); ToolbarContextMenu.updateExtension(this)">
|
||||
<menuitem oncommand="ToolbarContextMenu.removeExtensionForContextAction(this.parentElement)"
|
||||
accesskey="&customizeMenu.removeExtension.accesskey;"
|
||||
label="&customizeMenu.removeExtension.label;"
|
||||
contexttype="toolbaritem"
|
||||
class="customize-context-removeExtension"/>
|
||||
<menuitem oncommand="ToolbarContextMenu.openAboutAddonsForContextAction(this.parentElement)"
|
||||
accesskey="&customizeMenu.manageExtension.accesskey;"
|
||||
label="&customizeMenu.manageExtension.label;"
|
||||
contexttype="toolbaritem"
|
||||
class="customize-context-manageExtension"/>
|
||||
<menuitem oncommand="ToolbarContextMenu.removeExtensionForContextAction(this.parentElement)"
|
||||
accesskey="&customizeMenu.removeExtension.accesskey;"
|
||||
label="&customizeMenu.removeExtension.label;"
|
||||
contexttype="toolbaritem"
|
||||
class="customize-context-removeExtension"/>
|
||||
<menuseparator/>
|
||||
<menuitem oncommand="gCustomizeMode.addToPanel(document.popupNode)"
|
||||
id="customizationPanelItemContextMenuPin"
|
||||
|
|
|
@ -142,7 +142,7 @@ add_task(async function browseraction_contextmenu_manage_extension() {
|
|||
function checkVisibility(menu, visible) {
|
||||
let removeExtension = menu.querySelector(".customize-context-removeExtension");
|
||||
let manageExtension = menu.querySelector(".customize-context-manageExtension");
|
||||
let separator = manageExtension.nextElementSibling;
|
||||
let separator = removeExtension.nextElementSibling;
|
||||
|
||||
info(`Check visibility`);
|
||||
let expected = visible ? "visible" : "hidden";
|
||||
|
|
Загрузка…
Ссылка в новой задаче