Граф коммитов

609 Коммитов

Автор SHA1 Сообщение Дата
Ben Campbell 1521d401a3 Bug 1602326 - Tidy up error handling for callers of nsIMsgFolder.getOfflineFileStream(). r=mkmelin
Biggest churn is in nsImapMockChannel::ReadFromLocalCache() - this patch
switches it to use NS_ENSURE_SUCCESS() early-outs rather than big nested
if (NS_SUCCEEDED(rv))... clauses.
2021-03-12 12:50:34 +02:00
Ben Campbell 0169d0e2e3 Bug 1682942 - Replace nsISimpleEnumerator message enumeration in nsIMsgDBView, nsIMsgFolder and nsIMsgDatabase. r=mkmelin
Added an equivalent class - nsIMsgEnumerator - which still has the same
getNext()/hasMoreElements() methods as nsISimpleEnumerator. However, this new
getNext() returns nsIMsgHdr objects directly, rather than nsISupports, so
callers don't have to jump through extra QI hoops.
2021-02-26 12:41:47 +02:00
Henry Wilkes e5bf5649cf Bug 1667338 - Switch url from out parameter to return value in nsIMsgMessageService.GetUrlForUri. r=mkmelin
A return value is more convenient for calling in javascript.

Also renamed interface definition from GetUrlForUri to getUrlForUri to conform to javascript naming conventions.

Differential Revision: https://phabricator.services.mozilla.com/D106271

--HG--
extra : amend_source : 7ff0c6889942d16dff1e87c25c1d04b195373f64
2021-02-26 12:34:20 +02:00
Henry Wilkes ce7ac4cf11 Bug 1683305 - Remove use of valign attribute in XUL boxes. r=mkmelin
The attribute has no effect on the styling.

Differential Revision: https://phabricator.services.mozilla.com/D106270

--HG--
extra : amend_source : f739e4ce32c52d2095976b597fee7248a96a9df2
2021-02-25 14:30:29 +00:00
ISHIKAWA, Chiaki 1db1b0f3a1 Bug 1596036: Check GetOfflineFileStream() return value always first. r=benc 2021-02-22 22:35:57 +13:00
Ben Campbell db2a48bb1e Bug 1692919 - Remove leftover MsgGetHeadersFromKeys2() helper (added for Bug 1583030). r=mkmelin 2021-02-17 13:02:31 +02:00
Ben Campbell 5afc64da10 Bug 1682941 - Remove nsISimpleEnumerator from nsIMsgFolder.subFolders property. r=mkmelin 2021-02-12 21:31:17 +13:00
Geoff Lankow 77781cf2b4 Bug 1687847 - Set nsIChannel::DISPOSITION_ATTACHMENT on newsgroup attachments too. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D103733

--HG--
extra : amend_source : 03347e53d031693bf0e94694cdd24f079c0deef3
2021-02-02 12:30:58 +02:00
Ben Campbell edcd3030b5 Bug 1687412 - Fix up string types in folder creation to better handle unicode URIs. r=mkmelin 2021-01-21 12:47:10 +02:00
Ben Campbell 6bc9041f3e Bug 1687542 - Replace nsMsgKeyArray with nsTArray<nsMsgKey>. r=mkmelin 2021-01-20 21:24:27 +02:00
Ping Chen fc61427cdc Bug 1686034 - Use AUTF8String for uri attribute/arguments to support non-ASCII msg folder. r=mkmelin
The problem is since bug 1571672, mailbox file can be non-ASCII, as a result msg uri is non-ASCII. But the functions for querying msg from an URI still only accepts char*.

Main changes are three idl files:

    nsIMsgMailNewsUrl.idl: to fix msgHdr
    nsIMsgMailSeesion.idl: to fix view source
    nsIMsgMessageService.idl: to fix save as

Other changes are to make it compile.


Differential Revision: https://phabricator.services.mozilla.com/D101706
2021-01-19 12:56:14 +02:00
Ben Campbell 125a96b9f1 Bug 1682941 - Remove redundant nsIMsgFolder::GetMessages() implementations. r=mkmelin
nsImapMailFolder, nsLocalMailFolder and nsNewsFolder all had their own
GetMessages() which all did exactly the same thing.
2021-01-18 12:29:33 +02:00
Ian Neal 6cae9a77ac Bug 1680928 - Add GetCanCompactFoldersOnServer method to NNTP. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D98843

--HG--
extra : moz-landing-system : lando
2020-12-07 07:55:45 +00:00
Ben Campbell a09229121a Bug 1612239 - Remove nsIArray usage from nsIMsgFolder. r=mkmelin
--HG--
extra : amend_source : 5c6bd195120cd6ded0571a3ec88a6575020f9ed2
2020-12-03 13:41:57 +13:00
Ben Campbell 7ef33cbbeb Bug 1612239 - Remove nsIArray usage in nsIMsgFolder.DownloadMessagesForOffline(). r=mkmelin 2020-11-30 12:39:19 +02:00
Ping Chen d3f2d3ae4d Bug 1671880 - Part 2: Remove charset attribute from msg folder. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D97110

--HG--
extra : amend_source : 4cd4e5518281266aaca3ae51daad1636e977ddef
2020-11-19 14:38:45 +02:00
Ping Chen b968c66541 Bug 1671880 - Part 1: Remove mailnews.view_default_charset pref. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D96676

--HG--
extra : moz-landing-system : lando
2020-11-11 10:25:11 +00:00
Ben Campbell 5d1c166ed3 Bug 1612237 - Rename nsIMsgFilterCustomAction.apply() to applyAction(). r=mkmelin 2020-11-09 08:46:26 +02:00
Ben Campbell 865c628072 Bug 1612237 - Remove nsIArray use in nsIMsgFilterCustomAction.apply(). r=mkmelin 2020-11-09 08:46:08 +02:00
Rob Lemley 74c6535302 Bug 1672798 - Run black formatting on mozbuild and mozconfigure files. r=mkmelin
Bringing some sanity to our Python scripts.

Differential Revision: https://phabricator.services.mozilla.com/D95402

--HG--
extra : rebase_source : 7eed46d79663fa1f261bd64d9bc1c83c4867bfc4
extra : histedit_source : b8b700c76ab2fee92eb426b5a5b69dc86376e60f
2020-10-30 14:28:33 -04:00
Alfred Peters ed6466738d Bug 170727 - Remove the escaped dot from body lines before saving in the offline store so dot at the beginning of news posts won't be doubled. r=benc 2020-11-02 08:57:55 +02:00
Magnus Melin 961fffb129 Bug 1657988 - fix regression where multiple nntp messages couldn't be deleted at once. r=benc 2020-10-24 13:30:08 +03:00
Gene Smith 781317a7df Bug 1571672 - Add support for imap capability UTF8=ACCEPT (RFC 6855). r=mkmelin 2020-10-07 22:51:37 +03:00
Ben Campbell 5078fc95c3 Bug 1661955 - Followup. Remove now-unused nsINNTPProtocol.isCachedConnection attribute. r=mkmelin 2020-09-21 16:20:36 +12:00
Ben Campbell d805d4d038 Bug 1661955 - Followup. Add some comments on NNTP implementation. r=mkmelin 2020-09-21 15:58:46 +12:00
Ben Campbell 90238f5b19 Bug 1661955 - Fix stalled message display when using persistent NNTP connections. r=mkmelin 2020-09-16 13:50:44 +03:00
Magnus Melin f774b5f1bf Bug 1657493 - don't crash when readin news. r=benc 2020-08-27 13:54:42 +03:00
Mark Banner 8154f3e47f Bug 810814 - Enable opening pdf attachments within Thunderbird. r=mkmelin
Differential Revision: https://phabricator.services.mozilla.com/D86538

--HG--
extra : moz-landing-system : lando
2020-08-16 11:54:11 +00:00
Richard Marti cf003fb7b5 Bug 1657436 - Port bug 1528649: Remove the context parameter from nsInputStreamPump::AsyncRead. DONTBUILD r=rjl 2020-08-05 20:11:25 +02:00
Ben Campbell 8dc57157bf Bug 1612239 - nsIArray removal in nsIMsgFolder addKeywordsToMessages()/removeKeywordsFromMessages(). r=mkmelin DONTBUILD 2020-07-20 17:02:48 +12:00
Geoff Lankow 306ca78c3d Bug 1655463 - Convert callers of nsIWindowWatcher.openWindow to use const nsACString&. rs=bustage-fix DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D85103

--HG--
extra : rebase_source : a5e62155ba25c3a49b1fd0aadc6936b67d7b7958
extra : amend_source : fd5e668c657d860ba1daf39665c7c9e24a811c1e
2020-07-28 15:27:12 +12:00
Alessandro Castellani d8dd202c6c Bug 1653118 - Port bug 1366973 - Rename security flags within nsILoadInfo to not contain '_DATA_'. rs=bustage-fix
--HG--
extra : amend_source : 5a49356a43141f3f622db2de96100ec8649fac50
2020-07-15 15:41:10 -07:00
Geoff Lankow 0a60d34265 Bug 1652371 - Port bug 1649221 and bug 1649554. rs=bustage-fix CLOSED TREE
--HG--
extra : amend_source : cfc6361ee102cb0ee2e0c5b3497ec4a9b71688ca
2020-07-13 11:45:03 +12:00
Magnus Melin 7336730297 Bug 1648802 - Replace Thunderbird constant uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros . r=sg
# NS_LITERAL_CSTRING(ABC) -> nsLiteralCString(ABC)
find . -type f -not -path "*.hg/*" -not -path "third_party/*" -regex ".*\.\(c\|h\|cpp\|mm\)$" -exec sed -i -E 's/NS_LITERAL_CSTRING\(([^\)]*)\)/nsLiteralCString(\1)/g' {} \;

# NS_LITERAL_STRING(FOO) -> NS_LITERAL_STRING_FROM_CSTRING(FOO)
find . -type f -not -path "*.hg/*" -not -path "third_party/*" -regex ".*\.\(c\|h\|cpp\|mm\)$" -exec sed -i -E 's/NS_LITERAL_STRING\(([^\)]*)\)/NS_LITERAL_STRING_FROM_CSTRING(\1)/g' {} \;

 + some manual adjustments
 + clang-format
2020-07-03 20:34:57 +03:00
Magnus Melin ebdfde4d2e Bug 1648802 - Replace Thunderbird uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals.. r=sg
compare https://phabricator.services.mozilla.com/D80861#change-Yu2oZ2Beo1MA

# NS_LITERAL_CSTRING("foo") -> "foo"_ns
find . -type f -not -path "*.hg/*" -not -path "third_party/*" -regex ".*\.\(c\|h\|cpp\|mm\)$" -exec sed -i -E 's/NS_LITERAL_CSTRING\("([^\)]+)"\)/"\1"_ns/g' {} \;

# NS_LITERAL_STRING("foo") -> u"foo"_ns
find . -type f -not -path "*.hg/*" -not -path "third_party/*" -regex ".*\.\(c\|h\|cpp\|mm\)$" -exec sed -i -E 's/NS_LITERAL_STRING\("([^\)]+)"\)/u"\1"_ns/g' {} \;

 + manual replacements at least in

mailnews/imap/src/nsImapService.cpp
mailnews/local/src/nsPop3Sink.cpp
mailnews/extensions/fts3/src/nsFts3Tokenizer.cpp
mailnews/base/test/TestMsgStripRE.cpp
mailnews/base/util/nsMsgIncomingServer.cpp
mailnews/base/util/nsMsgDBFolder.cpp
mailnews/mime/src/mimemult.cpp
mailnews/mime/src/mimethtm.cpp


mailnews/compose/src/nsMsgCompose.cpp
mailnews/import/text/src/nsTextImport.cpp
mailnews/import/outlook/src/nsOutlookMail.cpp
mailnews/import/winlivemail/nsWMUtils.cpp
mailnews/import/becky/src/nsBeckyUtils.cpp
mailnews/extensions/smime/src/nsCertPicker.cpp
calendar/base/backend/libical/calUtils.cpp
suite/components/shell/nsWindowsShellService.cpp
mail/components/search/nsMailWinSearchHelper.cpp

+ clang-format
2020-07-01 16:15:43 +03:00
Magnus Melin 7dcaba3667 Bug 1648802 - remove Thunderbird usage of NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros (removed in bug 1648010). r=sg
# NS_NAMED_LITERAL_CSTRING(foo, "bar") -> constexpr auto foo = "bar"_ns;
find . -type f -not -path "*.hg/*" -not -path "third_party/*" -regex ".*\.\(c\|h\|cpp\|mm\)$" -exec sed -i -E 's/NS_NAMED_LITERAL_CSTRING\(([^,]+),\s*([^)]+)\)/constexpr auto \1 = \2_ns/g' {} \;

# NS_NAMED_LITERAL_STRING(foo, "bar") -> constexpr auto foo = u"bar"_ns;
find . -type f -not -path "*.hg/*" -not -path "third_party/*" -regex ".*\.\(c\|h\|cpp\|mm\)$" -exec sed -i -E 's/NS_NAMED_LITERAL_STRING\(([^,]+),\s*([^)]+)\)/constexpr auto \1 = u\2_ns/g' {} \;

 + a few manual replacements in nsMsgDBFolder.cpp and nsProfileMigrator.cpp
 + clang-format
2020-07-01 16:15:15 +03:00
Jorg K 93db6b3c14 Bug 1647104 - Fix typos in chat, common, db, editor, mail, mailnews found with codespell. rs=comment-only,typo-fix r=mkmelin DONTBUILD
This excludes OpenPGP code in mail/extensions.
2020-06-21 20:27:10 +02:00
Kai Engert 6c7626bd9a Bug 1647104 - Backed out changeset 9ca3551392f6. a=mkmelin 2020-06-22 14:09:32 +02:00
Jorg K 1a94f7447e Bug 1647104 - Fix typos in chat, common, db, editor, mail, mailnews found with codespell. rs=comment-only,typo-fix DONTBUILD 2020-06-21 20:27:10 +02:00
Ben Campbell edb8e187f9 Bug 1643561 - Reformat C++ to M-C clang-format rules (mainly PointerAlignment: Left). rs=mkmelin
--HG--
extra : rebase_source : b016214d8010531b3e277be07bdccbbbf1637e29
extra : amend_source : c056647392ab31b921b4d19029e694391ffd1894
2020-06-20 10:26:35 +12:00
Ben Campbell efd6582a5a Bug 1612239 - Remove nsIArray usage from nsIMsgFolder.descendants. r=mkmelin 2020-06-01 13:58:48 +03:00
Geoff Lankow 239949f709 Port bug 1641245 - Make string comparators not virtual. rs=bustage-fix
--HG--
extra : rebase_source : 37fbc2421c805891dd1f0a68ca826471a8d86e9b
extra : amend_source : c19bbe4a00ece7b4fd9a454885e9bb1c140074b2
extra : histedit_source : 69509a206ac2663b393c12e373cce03c9b5832d9
2020-05-28 16:11:57 +12:00
Ben Campbell 76156bb896 Bug 1612239 - Remove nsIArray usage from various calls related to message deletion. r=mkmelin 2020-04-19 12:52:38 +03:00
Geoff Lankow 5d3b169dd2 Port bug 1621359 - Update .idl files to work with ply3. rs=bustage-fix 2020-04-15 16:59:17 +12:00
Geoff Lankow f6b943b159 Bug 1614846 follow-up - Use another size_t instead of uint32_t to un-break Windows 64-bit builds. rs=bustage-fix 2020-04-01 21:22:21 +13:00
Ben Campbell 24d3883902 Bug 1614846 - Remove nsIArray use in nsIMsgAccountManager.allServers. r=mkmelin
--HG--
extra : histedit_source : 46d8ceb77a0e906928f6c6b904d5046922dc9a79
2020-03-28 07:53:42 +13:00
Ben Campbell a1f9609134 Bug 1614846 - remove nsIArray use in nsIMsgAccountManager.allIdentities. r=mkmelin,pmorris 2020-03-30 13:56:24 +03:00
Magnus Melin f8194bc981 Bug 1625679 - Port bug 1551306: Remove context parameter from nsIProgressEventSink.onProgress() and nsIProgressEventSink.onStatus(). r=Paenglab 2020-03-28 21:18:59 +02:00
Magnus Melin cc92d6e091 Bug 1621587 - remove external API compatibility functions from nsMsgUtils.h. r=benc DONTBUILD
#define MsgLowerCaseEqualsLiteral(str, l) (str).LowerCaseEqualsLiteral(l)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i -E "s/MsgLowerCaseEqualsLiteral\((.+), (.+)\)/\1.LowerCaseEqualsLiteral(\2)/g" {} \;
sed -i -E "s/MsgLowerCaseEqualsLiteral\(([^,]+), */\1.LowerCaseEqualsLiteral(/g" mailnews/base/util/nsMsgDBFolder.cpp mailnews/compose/src/nsURLFetcher.cpp

#define MsgRFindChar(str, ch, len) (str).RFindChar(ch, len)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i -E "s/MsgRFindChar\(([^,]+), */\1.RFindChar(/g" {} \;

#define MsgCompressWhitespace(str) (str).CompressWhitespace()
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i -E "s/MsgCompressWhitespace\(([^,]+)\)/\1.CompressWhitespace()/g" {} \;

#define MsgReplaceSubstring(str, what, replacement) (str).ReplaceSubstring(what, replacement)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i -E "s/MsgReplaceSubstring\(([^,]+), */\1.ReplaceSubstring(/g" {} \;

#define MsgIsUTF8(str) mozilla::IsUtf8(str)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i 's/MsgIsUTF8/mozilla::IsUtf8/g' {} \;

#define MsgNewInterfaceRequestorAggregation(aFirst, aSecond, aResult) NS_NewInterfaceRequestorAggregation(aFirst, aSecond, aResult)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i 's/MsgNewInterfaceRequestorAggregation/NS_NewInterfaceRequestorAggregation/g' {} \;

#define MsgNewNotificationCallbacksAggregation(aCallbacks, aLoadGroup, aResult) NS_NewNotificationCallbacksAggregation(aCallbacks, aLoadGroup, aResult)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i 's/MsgNewNotificationCallbacksAggregation/NS_NewNotificationCallbacksAggregation/g' {} \;

#define MsgReplaceChar(aString, aNeedle, aReplacement) (aString).ReplaceChar(aNeedle, aReplacement)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i -E "s/MsgReplaceChar\(([^,]+), */\1.ReplaceChar(/g" {} \;

#define MsgFind(str, what, ignore_case, offset) (str).Find(what, ignore_case, offset)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i -E "s/MsgFind\(([^,]+), */\1.Find(/g" {} \;

#define MsgCountChar(aString, aChar) (aString).CountChar(aChar)
find . -type f -not -path "*.hg/*" -regex ".*\.\(c\|h\|cpp\)$" -exec sed -i -E "s/MsgCountChar\(([^,]+), */\1.CountChar(/g" {} \;

# Find files using mozilla:IsUTF8 but not including the header
grep --exclude-dir=.hg -rl "mozilla::IsUtf8" | xargs grep -L "mozilla/Utf8.h"

# Now remove defines from mailnews/base/util/nsMsgUtils.h manually
# + remove IsUtf8 from nsMSgUtils.h
cd ..
./mach clang-format -p comm/mailnews
2020-03-16 12:54:02 +02:00
Ben Campbell 5315df009e Bug 1612237 - Remove nsIArray use from nsIMsgFilter interface. r=mkmelin
--HG--
extra : amend_source : c5d07179e00a5c6ac0a3d2fcb83c8d09884fb59d
2020-01-30 13:00:05 +13:00