Bug 1929845 - Remove remaining needless Ci. appreviations (except in calendar). r=mkmelin,leftmostcat
Fixing https://searchfox.org/comm-central/search?q=const.*+%3D+Ci.&path=&case=true®exp=true Differential Revision: https://phabricator.services.mozilla.com/D228322 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1d960930c1
Коммит
fd9aa6091d
|
@ -77,7 +77,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
{ isCardExpanded, isInDisabledSection }
|
||||
) {
|
||||
const { name } = addon;
|
||||
const { STATE_SOFTBLOCKED } = Ci.nsIBlocklistService;
|
||||
|
||||
const data = new ExtensionData(addon.getResourceURI());
|
||||
await data.loadManifest();
|
||||
|
@ -86,7 +85,7 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
(data.manifest.legacy ||
|
||||
(!addon.isCompatible &&
|
||||
(AddonManager.checkCompatibility ||
|
||||
addon.blocklistState !== STATE_SOFTBLOCKED)))
|
||||
addon.blocklistState !== Ci.nsIBlocklistService.STATE_SOFTBLOCKED)))
|
||||
) {
|
||||
return {
|
||||
linkId: "add-on-search-alternative-button-label",
|
||||
|
|
|
@ -727,14 +727,19 @@ function initMoveToFolderAgainMenu(aMenuItem) {
|
|||
* Update the "Show Header" menu items to reflect the current pref.
|
||||
*/
|
||||
function InitViewHeadersMenu() {
|
||||
const dt = Ci.nsMimeHeaderDisplayTypes;
|
||||
const headerchoice = Services.prefs.getIntPref("mail.show_headers");
|
||||
document
|
||||
.getElementById("cmd_viewAllHeader")
|
||||
.setAttribute("checked", headerchoice == dt.AllHeaders);
|
||||
.setAttribute(
|
||||
"checked",
|
||||
headerchoice == Ci.nsMimeHeaderDisplayTypes.AllHeaders
|
||||
);
|
||||
document
|
||||
.getElementById("cmd_viewNormalHeader")
|
||||
.setAttribute("checked", headerchoice == dt.NormalHeaders);
|
||||
.setAttribute(
|
||||
"checked",
|
||||
headerchoice == Ci.nsMimeHeaderDisplayTypes.NormalHeaders
|
||||
);
|
||||
document.commandDispatcher.updateCommands("create-menu-mark");
|
||||
}
|
||||
|
||||
|
|
|
@ -2682,11 +2682,10 @@ const gHeaderCustomize = {
|
|||
document.getElementById("headerSubjectLarge").checked =
|
||||
this.customizeData.subjectLarge || false;
|
||||
|
||||
const type = Ci.nsMimeHeaderDisplayTypes;
|
||||
const pref = Services.prefs.getIntPref("mail.show_headers");
|
||||
|
||||
document.getElementById("headerViewAllHeaders").checked =
|
||||
type.AllHeaders == pref;
|
||||
Ci.nsMimeHeaderDisplayTypes.AllHeaders == pref;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -3275,10 +3274,12 @@ function MarkSelectedMessagesFlagged(markFlagged) {
|
|||
* @param headermode {Ci.nsMimeHeaderDisplayTypes}
|
||||
*/
|
||||
function AdjustHeaderView(headermode) {
|
||||
const all = Ci.nsMimeHeaderDisplayTypes.AllHeaders;
|
||||
document
|
||||
.getElementById("messageHeader")
|
||||
.setAttribute("show_header_mode", headermode == all ? "all" : "normal");
|
||||
.setAttribute(
|
||||
"show_header_mode",
|
||||
headermode == Ci.nsMimeHeaderDisplayTypes.AllHeaders ? "all" : "normal"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -203,15 +203,16 @@ tabProgressListener.prototype = {
|
|||
this.mProgressListener.onSecurityChange(aWebProgress, aRequest, aState);
|
||||
}
|
||||
|
||||
const wpl = Ci.nsIWebProgressListener;
|
||||
const wpl_security_bits =
|
||||
wpl.STATE_IS_SECURE | wpl.STATE_IS_BROKEN | wpl.STATE_IS_INSECURE;
|
||||
Ci.nsIWebProgressListener.STATE_IS_SECURE |
|
||||
Ci.nsIWebProgressListener.STATE_IS_BROKEN |
|
||||
Ci.nsIWebProgressListener.STATE_IS_INSECURE;
|
||||
let level = "";
|
||||
switch (aState & wpl_security_bits) {
|
||||
case wpl.STATE_IS_SECURE:
|
||||
case Ci.nsIWebProgressListener.STATE_IS_SECURE:
|
||||
level = "high";
|
||||
break;
|
||||
case wpl.STATE_IS_BROKEN:
|
||||
case Ci.nsIWebProgressListener.STATE_IS_BROKEN:
|
||||
level = "broken";
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -917,37 +917,35 @@ var snapshotFormatters = {
|
|||
}
|
||||
|
||||
function createDeviceInfoRow(device) {
|
||||
const deviceInfo = Ci.nsIAudioDeviceInfo;
|
||||
|
||||
const states = {};
|
||||
states[deviceInfo.STATE_DISABLED] = "Disabled";
|
||||
states[deviceInfo.STATE_UNPLUGGED] = "Unplugged";
|
||||
states[deviceInfo.STATE_ENABLED] = "Enabled";
|
||||
states[Ci.nsIAudioDeviceInfo.STATE_DISABLED] = "Disabled";
|
||||
states[Ci.nsIAudioDeviceInfo.STATE_UNPLUGGED] = "Unplugged";
|
||||
states[Ci.nsIAudioDeviceInfo.STATE_ENABLED] = "Enabled";
|
||||
|
||||
const preferreds = {};
|
||||
preferreds[deviceInfo.PREF_NONE] = "None";
|
||||
preferreds[deviceInfo.PREF_MULTIMEDIA] = "Multimedia";
|
||||
preferreds[deviceInfo.PREF_VOICE] = "Voice";
|
||||
preferreds[deviceInfo.PREF_NOTIFICATION] = "Notification";
|
||||
preferreds[deviceInfo.PREF_ALL] = "All";
|
||||
preferreds[Ci.nsIAudioDeviceInfo.PREF_NONE] = "None";
|
||||
preferreds[Ci.nsIAudioDeviceInfo.PREF_MULTIMEDIA] = "Multimedia";
|
||||
preferreds[Ci.nsIAudioDeviceInfo.PREF_VOICE] = "Voice";
|
||||
preferreds[Ci.nsIAudioDeviceInfo.PREF_NOTIFICATION] = "Notification";
|
||||
preferreds[Ci.nsIAudioDeviceInfo.PREF_ALL] = "All";
|
||||
|
||||
const formats = {};
|
||||
formats[deviceInfo.FMT_S16LE] = "S16LE";
|
||||
formats[deviceInfo.FMT_S16BE] = "S16BE";
|
||||
formats[deviceInfo.FMT_F32LE] = "F32LE";
|
||||
formats[deviceInfo.FMT_F32BE] = "F32BE";
|
||||
formats[Ci.nsIAudioDeviceInfo.FMT_S16LE] = "S16LE";
|
||||
formats[Ci.nsIAudioDeviceInfo.FMT_S16BE] = "S16BE";
|
||||
formats[Ci.nsIAudioDeviceInfo.FMT_F32LE] = "F32LE";
|
||||
formats[Ci.nsIAudioDeviceInfo.FMT_F32BE] = "F32BE";
|
||||
|
||||
function toPreferredString(preferred) {
|
||||
if (preferred == deviceInfo.PREF_NONE) {
|
||||
return preferreds[deviceInfo.PREF_NONE];
|
||||
} else if (preferred & deviceInfo.PREF_ALL) {
|
||||
return preferreds[deviceInfo.PREF_ALL];
|
||||
if (preferred == Ci.nsIAudioDeviceInfo.PREF_NONE) {
|
||||
return preferreds[Ci.nsIAudioDeviceInfo.PREF_NONE];
|
||||
} else if (preferred & Ci.nsIAudioDeviceInfo.PREF_ALL) {
|
||||
return preferreds[Ci.nsIAudioDeviceInfo.PREF_ALL];
|
||||
}
|
||||
let str = "";
|
||||
for (const pref of [
|
||||
deviceInfo.PREF_MULTIMEDIA,
|
||||
deviceInfo.PREF_VOICE,
|
||||
deviceInfo.PREF_NOTIFICATION,
|
||||
Ci.nsIAudioDeviceInfo.PREF_MULTIMEDIA,
|
||||
Ci.nsIAudioDeviceInfo.PREF_VOICE,
|
||||
Ci.nsIAudioDeviceInfo.PREF_NOTIFICATION,
|
||||
]) {
|
||||
if (preferred & pref) {
|
||||
str += " " + preferreds[pref];
|
||||
|
@ -959,10 +957,10 @@ var snapshotFormatters = {
|
|||
function toFromatString(dev) {
|
||||
let str = "default: " + formats[dev.defaultFormat] + ", support:";
|
||||
for (const fmt of [
|
||||
deviceInfo.FMT_S16LE,
|
||||
deviceInfo.FMT_S16BE,
|
||||
deviceInfo.FMT_F32LE,
|
||||
deviceInfo.FMT_F32BE,
|
||||
Ci.nsIAudioDeviceInfo.FMT_S16LE,
|
||||
Ci.nsIAudioDeviceInfo.FMT_S16BE,
|
||||
Ci.nsIAudioDeviceInfo.FMT_F32LE,
|
||||
Ci.nsIAudioDeviceInfo.FMT_F32BE,
|
||||
]) {
|
||||
if (dev.supportedFormat & fmt) {
|
||||
str += " " + formats[fmt];
|
||||
|
|
|
@ -11042,9 +11042,9 @@ function InitEditor() {
|
|||
// Set eEditorMailMask flag to avoid using content prefs for spell checker,
|
||||
// otherwise dictionary setting in preferences is ignored and dictionary is
|
||||
// inconsistent in subject and message body.
|
||||
const eEditorMailMask = Ci.nsIEditor.eEditorMailMask;
|
||||
editor.flags |= eEditorMailMask;
|
||||
document.getElementById("msgSubject").editor.flags |= eEditorMailMask;
|
||||
editor.flags |= Ci.nsIEditor.eEditorMailMask;
|
||||
document.getElementById("msgSubject").editor.flags |=
|
||||
Ci.nsIEditor.eEditorMailMask;
|
||||
|
||||
// Control insertion of line breaks.
|
||||
editor.returnInParagraphCreatesNewParagraph = Services.prefs.getBoolPref(
|
||||
|
|
|
@ -766,10 +766,10 @@ Enigmail.msg = {
|
|||
const p = Cc["@mozilla.org/parserutils;1"].createInstance(
|
||||
Ci.nsIParserUtils
|
||||
);
|
||||
const de = Ci.nsIDocumentEncoder;
|
||||
msgText = p.convertToPlainText(
|
||||
topElement.innerHTML,
|
||||
de.OutputRaw | de.OutputBodyOnly,
|
||||
Ci.nsIDocumentEncoder.OutputRaw |
|
||||
Ci.nsIDocumentEncoder.OutputBodyOnly,
|
||||
0
|
||||
);
|
||||
} else {
|
||||
|
|
|
@ -733,9 +733,10 @@ Enigmail.msg = {
|
|||
wrapresultObj.cancelled = false;
|
||||
wrapresultObj.usePpgMime = false;
|
||||
try {
|
||||
const dce = Ci.nsIDocumentEncoder;
|
||||
var editor = gMsgCompose.editor.QueryInterface(Ci.nsIEditorMailSupport);
|
||||
var encoderFlags = dce.OutputFormatted | dce.OutputLFLineBreak;
|
||||
var encoderFlags =
|
||||
Ci.nsIDocumentEncoder.OutputFormatted |
|
||||
Ci.nsIDocumentEncoder.OutputLFLineBreak;
|
||||
|
||||
var wrapWidth = Services.prefs.getIntPref("mailnews.wraplength");
|
||||
if (wrapWidth > 0 && wrapWidth < 68 && editor.wrapWidth > 0) {
|
||||
|
@ -1709,8 +1710,9 @@ Enigmail.msg = {
|
|||
|
||||
EnigmailCore.init();
|
||||
|
||||
const dce = Ci.nsIDocumentEncoder;
|
||||
var encoderFlags = dce.OutputFormatted | dce.OutputLFLineBreak;
|
||||
var encoderFlags =
|
||||
Ci.nsIDocumentEncoder.OutputFormatted |
|
||||
Ci.nsIDocumentEncoder.OutputLFLineBreak;
|
||||
|
||||
var docText = this.editorGetContentAs("text/plain", encoderFlags);
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@ AbAutoCompleteMyDomain.prototype = {
|
|||
const params = aSearchParam ? JSON.parse(aSearchParam) : {};
|
||||
const applicable =
|
||||
"type" in params && this.applicableHeaders.has(params.type);
|
||||
const ACR = Ci.nsIAutoCompleteResult;
|
||||
var address = null;
|
||||
if (applicable && aString && !aString.includes(",")) {
|
||||
if ("idKey" in params && params.idKey != this.cachedIdKey) {
|
||||
|
@ -34,7 +33,9 @@ AbAutoCompleteMyDomain.prototype = {
|
|||
|
||||
var result = {
|
||||
searchString: aString,
|
||||
searchResult: address ? ACR.RESULT_SUCCESS : ACR.RESULT_FAILURE,
|
||||
searchResult: address
|
||||
? Ci.nsIAutoCompleteResult.RESULT_SUCCESS
|
||||
: Ci.nsIAutoCompleteResult.RESULT_FAILURE,
|
||||
defaultIndex: -1,
|
||||
errorDescription: null,
|
||||
matchCount: address ? 1 : 0,
|
||||
|
|
|
@ -196,8 +196,9 @@ function loadInboxForNewAccount() {
|
|||
// was created, the download messages box is checked, and the wizard was opened from the 3pane
|
||||
if (gNewAccountToLoad) {
|
||||
var rootMsgFolder = gNewAccountToLoad.incomingServer.rootMsgFolder;
|
||||
const kInboxFlag = Ci.nsMsgFolderFlags.Inbox;
|
||||
var inboxFolder = rootMsgFolder.getFolderWithFlags(kInboxFlag);
|
||||
var inboxFolder = rootMsgFolder.getFolderWithFlags(
|
||||
Ci.nsMsgFolderFlags.Inbox
|
||||
);
|
||||
SelectFolder(inboxFolder.URI);
|
||||
window.focus();
|
||||
setTimeout(MsgGetMessage, 0);
|
||||
|
|
|
@ -205,8 +205,11 @@ OAuth2.prototype = {
|
|||
},
|
||||
|
||||
onStateChange(webProgress, aRequest, aStateFlags) {
|
||||
const wpl = Ci.nsIWebProgressListener;
|
||||
if (aStateFlags & (wpl.STATE_START | wpl.STATE_IS_NETWORK)) {
|
||||
if (
|
||||
aStateFlags &
|
||||
(Ci.nsIWebProgressListener.STATE_START |
|
||||
Ci.nsIWebProgressListener.STATE_IS_NETWORK)
|
||||
) {
|
||||
const channel = aRequest.QueryInterface(Ci.nsIChannel);
|
||||
this._checkForRedirect(channel.URI.spec);
|
||||
}
|
||||
|
|
|
@ -495,10 +495,9 @@ function saveFilter() {
|
|||
);
|
||||
}
|
||||
} else {
|
||||
const otherHeader = Ci.nsMsgSearchAttrib.OtherHeader;
|
||||
const attribValue =
|
||||
obj.searchattribute.value > otherHeader
|
||||
? otherHeader
|
||||
obj.searchattribute.value > Ci.nsMsgSearchAttrib.OtherHeader
|
||||
? Ci.nsMsgSearchAttrib.OtherHeader
|
||||
: obj.searchattribute.value;
|
||||
if (
|
||||
!obj.searchattribute.validityTable.getAvailable(
|
||||
|
|
Загрузка…
Ссылка в новой задаче