forked from mirrors/gecko-dev
Bug 1506112 - Replace customize-context-autoHide class with meaningful id. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D11469 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
d533fe7a8f
commit
8d6b57d979
3 changed files with 5 additions and 5 deletions
|
|
@ -6299,7 +6299,7 @@ function UpdateCurrentCharset(target) {
|
||||||
|
|
||||||
var ToolbarContextMenu = {
|
var ToolbarContextMenu = {
|
||||||
updateDownloadsAutoHide(popup) {
|
updateDownloadsAutoHide(popup) {
|
||||||
let checkbox = popup.querySelector(".customize-context-autoHide");
|
let checkbox = document.getElementById("toolbar-context-autohide-downloads-button");
|
||||||
let isDownloads = popup.triggerNode && ["downloads-button", "wrapper-downloads-button"].includes(popup.triggerNode.id);
|
let isDownloads = popup.triggerNode && ["downloads-button", "wrapper-downloads-button"].includes(popup.triggerNode.id);
|
||||||
checkbox.hidden = !isDownloads;
|
checkbox.hidden = !isDownloads;
|
||||||
if (DownloadsButton.autoHideDownloadsButton) {
|
if (DownloadsButton.autoHideDownloadsButton) {
|
||||||
|
|
|
||||||
|
|
@ -432,12 +432,12 @@ xmlns="http://www.w3.org/1999/xhtml"
|
||||||
label="&customizeMenu.pinToOverflowMenu.label;"
|
label="&customizeMenu.pinToOverflowMenu.label;"
|
||||||
contexttype="toolbaritem"
|
contexttype="toolbaritem"
|
||||||
class="customize-context-moveToPanel"/>
|
class="customize-context-moveToPanel"/>
|
||||||
<menuitem oncommand="ToolbarContextMenu.onDownloadsAutoHideChange(event)"
|
<menuitem id="toolbar-context-autohide-downloads-button"
|
||||||
|
oncommand="ToolbarContextMenu.onDownloadsAutoHideChange(event);"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
accesskey="&customizeMenu.autoHideDownloadsButton.accesskey;"
|
accesskey="&customizeMenu.autoHideDownloadsButton.accesskey;"
|
||||||
label="&customizeMenu.autoHideDownloadsButton.label;"
|
label="&customizeMenu.autoHideDownloadsButton.label;"
|
||||||
contexttype="toolbaritem"
|
contexttype="toolbaritem"/>
|
||||||
class="customize-context-autoHide"/>
|
|
||||||
<menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
|
<menuitem oncommand="gCustomizeMode.removeFromArea(document.popupNode)"
|
||||||
accesskey="&customizeMenu.removeFromToolbar.accesskey;"
|
accesskey="&customizeMenu.removeFromToolbar.accesskey;"
|
||||||
label="&customizeMenu.removeFromToolbar.label;"
|
label="&customizeMenu.removeFromToolbar.label;"
|
||||||
|
|
|
||||||
|
|
@ -290,7 +290,7 @@ add_task(async function checkStateWhenHiddenInPalette() {
|
||||||
|
|
||||||
add_task(async function checkContextMenu() {
|
add_task(async function checkContextMenu() {
|
||||||
let contextMenu = document.getElementById("toolbar-context-menu");
|
let contextMenu = document.getElementById("toolbar-context-menu");
|
||||||
let checkbox = contextMenu.querySelector(".customize-context-autoHide");
|
let checkbox = document.getElementById("toolbar-context-autohide-downloads-button");
|
||||||
let button = document.getElementById("downloads-button");
|
let button = document.getElementById("downloads-button");
|
||||||
|
|
||||||
is(Services.prefs.getBoolPref(kDownloadAutoHidePref), true,
|
is(Services.prefs.getBoolPref(kDownloadAutoHidePref), true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue