зеркало из https://github.com/mozilla/pjs.git
Bug 733339 - part 2: replace gPageStyleMenu.setStyleDisabled with gPageStyleMenu.disableStyle. r=dolske
This commit is contained in:
Родитель
d70a1ca8e1
Коммит
5bac1db86f
|
@ -292,12 +292,11 @@
|
|||
<menu id="pageStyleMenu" label="&pageStyleMenu.label;"
|
||||
accesskey="&pageStyleMenu.accesskey;" observes="isImage">
|
||||
<menupopup onpopupshowing="gPageStyleMenu.fillPopup(this);"
|
||||
oncommand="gPageStyleMenu.switchStyleSheet(window.content, event.target.getAttribute('data'));
|
||||
gPageStyleMenu.setStyleDisabled(false);">
|
||||
oncommand="gPageStyleMenu.switchStyleSheet(window.content, event.target.getAttribute('data'));">
|
||||
<menuitem id="menu_pageStyleNoStyle"
|
||||
label="&pageStyleNoStyle.label;"
|
||||
accesskey="&pageStyleNoStyle.accesskey;"
|
||||
oncommand="gPageStyleMenu.setStyleDisabled(true); event.stopPropagation();"
|
||||
oncommand="gPageStyleMenu.disableStyle(); event.stopPropagation();"
|
||||
type="radio"/>
|
||||
<menuitem id="menu_pageStylePersistentOnly"
|
||||
label="&pageStylePersistentOnly.label;"
|
||||
|
|
|
@ -6167,16 +6167,21 @@ var gPageStyleMenu = {
|
|||
}
|
||||
},
|
||||
|
||||
switchStyleSheet: function (frameset, title) {
|
||||
_stylesheetSwitchAll: function (frameset, title) {
|
||||
if (!title || title == "_nostyle" || this._stylesheetInFrame(frameset, title))
|
||||
this._stylesheetSwitchFrame(frameset, title);
|
||||
|
||||
for (let i = 0; i < frameset.frames.length; i++)
|
||||
this.switchStyleSheet(frameset.frames[i], title);
|
||||
this._stylesheetSwitchAll(frameset.frames[i], title);
|
||||
},
|
||||
|
||||
setStyleDisabled: function (disabled) {
|
||||
getMarkupDocumentViewer().authorStyleDisabled = disabled;
|
||||
switchStyleSheet: function (contentWindow, title) {
|
||||
getMarkupDocumentViewer().authorStyleDisabled = false;
|
||||
this._stylesheetSwitchAll(contentWindow, title);
|
||||
},
|
||||
|
||||
disableStyle: function () {
|
||||
getMarkupDocumentViewer().authorStyleDisabled = true;
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -6184,7 +6189,10 @@ var gPageStyleMenu = {
|
|||
var getAllStyleSheets = gPageStyleMenu.getAllStyleSheets.bind(gPageStyleMenu);
|
||||
var stylesheetFillPopup = gPageStyleMenu.fillPopup.bind(gPageStyleMenu);
|
||||
var stylesheetSwitchAll = gPageStyleMenu.switchStyleSheet.bind(gPageStyleMenu);
|
||||
var setStyleDisabled = gPageStyleMenu.setStyleDisabled.bind(gPageStyleMenu);
|
||||
function setStyleDisabled(disabled) {
|
||||
if (disabled)
|
||||
gPageStyleMenu.disableStyle();
|
||||
}
|
||||
|
||||
|
||||
var BrowserOffline = {
|
||||
|
|
Загрузка…
Ссылка в новой задаче