diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index a6adbdb85d7..895c7f946a8 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -291,16 +291,16 @@ - + diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index e2e7e812ebc..bd0e7b81f25 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -6156,6 +6156,7 @@ var gPageStyleMenu = { menuItem.setAttribute("label", currentStyleSheet.title); menuItem.setAttribute("data", currentStyleSheet.title); menuItem.setAttribute("checked", !currentStyleSheet.disabled && !styleDisabled); + menuItem.setAttribute("oncommand", "gPageStyleMenu.switchStyleSheet(this.getAttribute('data'));"); menuPopup.appendChild(menuItem); currentStyleSheets[currentStyleSheet.title] = menuItem; } else if (currentStyleSheet.disabled) { @@ -6167,7 +6168,6 @@ var gPageStyleMenu = { persistentOnly.setAttribute("checked", !altStyleSelected && !styleDisabled); persistentOnly.hidden = (window.content.document.preferredStyleSheetSet) ? haveAltSheets : false; sep.hidden = (noStyle.hidden && persistentOnly.hidden) || !haveAltSheets; - return true; }, _stylesheetInFrame: function (frame, title) { @@ -6181,9 +6181,7 @@ var gPageStyleMenu = { for (let i = 0; i < docStyleSheets.length; ++i) { let docStyleSheet = docStyleSheets[i]; - if (title == "_nostyle") - docStyleSheet.disabled = true; - else if (docStyleSheet.title) + if (docStyleSheet.title) docStyleSheet.disabled = (docStyleSheet.title != title); else if (docStyleSheet.disabled) docStyleSheet.disabled = false; @@ -6191,7 +6189,7 @@ var gPageStyleMenu = { }, _stylesheetSwitchAll: function (frameset, title) { - if (!title || title == "_nostyle" || this._stylesheetInFrame(frameset, title)) + if (!title || this._stylesheetInFrame(frameset, title)) this._stylesheetSwitchFrame(frameset, title); for (let i = 0; i < frameset.frames.length; i++)