mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 734706 - The Page Style menu's "No Style" menu item shouldn't have to stop the command event propagation. r=dolske
--HG-- extra : rebase_source : 9ec2ad2ab0ae529b24dd8f7ed2756295061cb545
This commit is contained in:
parent
44356e2d5f
commit
b89eb408fd
@ -291,16 +291,16 @@
|
||||
</menu>
|
||||
<menu id="pageStyleMenu" label="&pageStyleMenu.label;"
|
||||
accesskey="&pageStyleMenu.accesskey;" observes="isImage">
|
||||
<menupopup onpopupshowing="gPageStyleMenu.fillPopup(this);"
|
||||
oncommand="gPageStyleMenu.switchStyleSheet(event.target.getAttribute('data'));">
|
||||
<menupopup onpopupshowing="gPageStyleMenu.fillPopup(this);">
|
||||
<menuitem id="menu_pageStyleNoStyle"
|
||||
label="&pageStyleNoStyle.label;"
|
||||
accesskey="&pageStyleNoStyle.accesskey;"
|
||||
oncommand="gPageStyleMenu.disableStyle(); event.stopPropagation();"
|
||||
oncommand="gPageStyleMenu.disableStyle();"
|
||||
type="radio"/>
|
||||
<menuitem id="menu_pageStylePersistentOnly"
|
||||
label="&pageStylePersistentOnly.label;"
|
||||
accesskey="&pageStylePersistentOnly.accesskey;"
|
||||
oncommand="gPageStyleMenu.switchStyleSheet('');"
|
||||
type="radio"
|
||||
checked="true"/>
|
||||
<menuseparator/>
|
||||
|
@ -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++)
|
||||
|
Loading…
Reference in New Issue
Block a user