Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
thunderbird
Commits
c5b36d3e
Commit
c5b36d3e
authored
Dec 19, 2021
by
Carsten Schoenert
Browse files
New upstream version 91.4.1
parent
0899850a
Changes
258
Expand all
Hide whitespace changes
Inline
Side-by-side
browser/config/version.txt
View file @
c5b36d3e
91.4.
0
91.4.
1
browser/config/version_display.txt
View file @
c5b36d3e
91.4.
0
esr
91.4.
1
esr
comm/.gecko_rev.yml
View file @
c5b36d3e
---
GECKO_BASE_REPOSITORY
:
https://hg.mozilla.org/mozilla-unified
GECKO_HEAD_REPOSITORY
:
https://hg.mozilla.org/releases/mozilla-esr91
GECKO_HEAD_REF
:
FIREFOX_91_4_
0
esr_BUILD1
GECKO_HEAD_REV
:
3359a85a2277bbcbcc2b5ebcc425922a23d07f34
GECKO_HEAD_REF
:
FIREFOX_91_4_
1
esr_BUILD1
GECKO_HEAD_REV
:
a1fd35b0b8f66b8660de9ed95223120765de2e11
### For comm-central
# GECKO_BASE_REPOSITORY: https://hg.mozilla.org/mozilla-unified
...
...
comm/calendar/base/content/item-editing/calendar-item-iframe.js
View file @
c5b36d3e
...
...
@@ -2234,8 +2234,8 @@ function makePrettyName(aUri) {
* Asynchronously uploads the given attachment to the cloud provider, updating
* the passed listItem as things progress.
*
* @param attachment A calIAttachment to upload
* @param cloud
Provider
The clou
l
d
provider to
upload
to
* @param attachment A calIAttachment to upload
.
* @param cloud
FileAccount
The cloud
file account used for
upload
ing.
* @param listItem The listitem in attachment-link listbox to update.
*/
function
uploadCloudAttachment
(
attachment
,
cloudFileAccount
,
listItem
)
{
...
...
@@ -2249,16 +2249,17 @@ function uploadCloudAttachment(attachment, cloudFileAccount, listItem) {
delete
gAttachMap
[
attachment
.
hashId
];
attachment
.
uri
=
Services
.
io
.
newURI
(
upload
.
url
);
attachment
.
setParameter
(
"
FILENAME
"
,
file
.
leafName
);
attachment
.
setParameter
(
"
PROVIDER
"
,
cloudFileAccount
.
type
);
attachment
.
setParameter
(
"
X-SERVICE-ICONURL
"
,
upload
.
serviceIcon
);
listItem
.
setAttribute
(
"
label
"
,
file
.
leafName
);
gAttachMap
[
attachment
.
hashId
]
=
attachment
;
image
.
setAttribute
(
"
src
"
,
cloudFileAccount
.
iconURL
);
image
.
setAttribute
(
"
src
"
,
upload
.
serviceIcon
);
listItem
.
attachCloudFileUpload
=
upload
;
updateAttachment
();
},
statusCode
=>
{
cal
.
ERROR
(
"
[calendar-event-dialog] Uploading cloud attachment failed. Status code:
"
+
statusCode
"
[calendar-event-dialog] Uploading cloud attachment failed. Status code:
"
+
statusCode
.
result
);
// Uploading failed. First of all, show an error icon. Also,
...
...
@@ -2295,6 +2296,8 @@ function addAttachment(attachment, cloudFileAccount) {
let
listItem
=
document
.
createXULElement
(
"
richlistitem
"
);
let
image
=
document
.
createElement
(
"
img
"
);
image
.
setAttribute
(
"
alt
"
,
""
);
image
.
width
=
"
24
"
;
image
.
height
=
"
24
"
;
listItem
.
appendChild
(
image
);
let
label
=
document
.
createXULElement
(
"
label
"
);
label
.
setAttribute
(
"
value
"
,
makePrettyName
(
attachment
.
uri
));
...
...
@@ -2307,8 +2310,9 @@ function addAttachment(attachment, cloudFileAccount) {
image
.
setAttribute
(
"
src
"
,
"
chrome://messenger/skin/icons/connecting.png
"
);
uploadCloudAttachment
(
attachment
,
cloudFileAccount
,
listItem
);
}
else
{
let
cloudFileIconURL
=
attachment
.
getParameter
(
"
X-SERVICE-ICONURL
"
);
image
.
setAttribute
(
"
src
"
,
cloudFileIconURL
);
let
leafName
=
attachment
.
getParameter
(
"
FILENAME
"
);
image
.
setAttribute
(
"
src
"
,
cloudFileAccount
.
iconURL
);
if
(
leafName
)
{
listItem
.
setAttribute
(
"
label
"
,
leafName
);
}
...
...
@@ -2317,16 +2321,15 @@ function addAttachment(attachment, cloudFileAccount) {
image
.
setAttribute
(
"
src
"
,
"
moz-icon://
"
+
attachment
.
uri
.
spec
);
}
else
{
let
leafName
=
attachment
.
getParameter
(
"
FILENAME
"
);
let
providerType
=
attachment
.
getParameter
(
"
PROVIDER
"
);
let
cloudFileIconURL
=
attachment
.
getParameter
(
"
X-SERVICE-ICONURL
"
);
let
cloudFileEnabled
=
Services
.
prefs
.
getBoolPref
(
"
mail.cloud_files.enabled
"
,
false
);
if
(
leafName
)
{
// TODO security issues?
listItem
.
setAttribute
(
"
label
"
,
leafName
);
}
if
(
providerType
&&
cloudFileEnabled
)
{
let
provider
=
cloudFileAccounts
.
getProviderForType
(
providerType
);
image
.
setAttribute
(
"
src
"
,
provider
.
iconURL
);
if
(
cloudFileIconURL
&&
cloudFileEnabled
)
{
image
.
setAttribute
(
"
src
"
,
cloudFileIconURL
);
}
else
{
let
iconSrc
=
attachment
.
uri
.
spec
.
length
?
attachment
.
uri
.
spec
:
"
dummy.html
"
;
if
(
attachment
.
formatType
)
{
...
...
comm/calendar/base/themes/common/calendar-views.css
View file @
c5b36d3e
...
...
@@ -155,7 +155,7 @@
overflow-x
:
hidden
;
}
.calendar-item-flex
>
alarm-icons-box
{
.calendar-item-flex
>
.
alarm-icons-box
{
display
:
contents
;
}
...
...
@@ -207,6 +207,10 @@
white-space
:
nowrap
;
}
calendar-event-column
.event-name-label
{
white-space
:
normal
;
}
.event-name-input
,
.event-name-label
{
flex
:
1
1
auto
;
...
...
comm/calendar/base/themes/common/calendar.css
View file @
c5b36d3e
...
...
@@ -122,8 +122,20 @@
padding
:
3px
;
}
:root
[
lwt-tree-brighttext
]
.calendar-notification-bar
{
background-color
:
#464cb9
;
@media
(
prefers-color-scheme
:
dark
)
{
.calendar-notification-bar
{
background-color
:
#464cb9
;
}
}
@media
(
prefers-contrast
)
{
.calendar-notification-bar
:not
(
:-moz-lwtheme
)
{
background-color
:
Highlight
;
}
.calendar-notification-bar
:not
(
:-moz-lwtheme
)
>
*
:not
(
#imip-view-toolbox
)
{
color
:
HighlightText
;
}
}
.calendar-notification-bar
{
...
...
comm/calendar/test/browser/eventDialog/browser_attachMenu.js
View file @
c5b36d3e
...
...
@@ -151,6 +151,11 @@ add_task(async function testAttachProvider() {
setTimeout
(()
=>
resolve
({
url
:
fileUrl
,
// The uploadFile() function should return serviceIcon, serviceName
// and serviceURL - either default or user defined values specified
// by the onFileUpload event. The item-edit dialog uses only the
// serviceIcon.
serviceIcon
:
"
chrome://messenger/skin/icons/globe.svg
"
,
})
)
);
...
...
@@ -249,7 +254,11 @@ add_task(async function testAttachProvider() {
Assert
.
equal
(
listItem
.
attachCloudFileUpload
.
url
,
fileUrl
,
"
upload attached to event
"
);
let
listItemImage
=
listItem
.
querySelector
(
"
img
"
);
Assert
.
equal
(
listItemImage
.
src
,
iconURL
,
"
attachment image is provider image
"
);
Assert
.
equal
(
listItemImage
.
src
,
"
chrome://messenger/skin/icons/globe.svg
"
,
"
attachment image is provider image
"
);
// Save the new event.
eventWin
.
document
.
querySelector
(
"
#button-saveandclose
"
).
click
();
...
...
comm/calendar/test/unit/data/previous.json
View file @
c5b36d3e
{
"version"
:
"2.2021
a
"
,
"version"
:
"2.2021
c
"
,
"aliases"
:
[
"AUS Central Standard Time"
,
"AUS Eastern Standard Time"
,
...
...
@@ -116,6 +116,7 @@
"Pacific SA Standard Time"
,
"Pacific Standard Time"
,
"Pacific Standard Time (Mexico)"
,
"Pacific/Enderbury"
,
"Pacific/Johnston"
,
"Pakistan Standard Time"
,
"Paraguay Standard Time"
,
...
...
@@ -570,7 +571,6 @@
"Pacific/Chuuk"
,
"Pacific/Easter"
,
"Pacific/Efate"
,
"Pacific/Enderbury"
,
"Pacific/Fakaofo"
,
"Pacific/Fiji"
,
"Pacific/Funafuti"
,
...
...
@@ -579,6 +579,7 @@
"Pacific/Guadalcanal"
,
"Pacific/Guam"
,
"Pacific/Honolulu"
,
"Pacific/Kanton"
,
"Pacific/Kiritimati"
,
"Pacific/Kosrae"
,
"Pacific/Kwajalein"
,
...
...
comm/calendar/timezones/zones.json
View file @
c5b36d3e
{
"version"
:
"2.2021
c
"
,
"version"
:
"2.2021
e
"
,
"aliases"
:
{
"AUS Central Standard Time"
:
{
"aliasTo"
:
"Australia/Darwin"
...
...
@@ -2277,9 +2277,9 @@
"Asia/Gaza"
:
{
"ics"
:
[
"BEGIN:DAYLIGHT
\r\n
TZOFFSETFROM:+0200
\r\n
TZOFFSETTO:+0300
\r\n
TZNAME:EEST
\r\n
DTSTART:20200328T000000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=24,25,26,27,28,29,30;BYDAY=SA
\r\n
END:DAYLIGHT"
,
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+0
3
00
\r\n
TZOFFSETTO:+0200
\r\n
TZNAME:EET
\r\n
DTSTART:202
0
102
4
T010000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=10;BY
MONTHDAY=24,25,26,27,28,29,30;BYDAY=SA
\r\n
END:STANDARD"
,
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+0
2
00
\r\n
TZOFFSETTO:+0200
\r\n
TZNAME:EET
\r\n
DTSTART:202
1
102
9
T010000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=10;BY
DAY=-1FR
\r\n
END:STANDARD"
,
"BEGIN:DAYLIGHT
\r\n
TZOFFSETFROM:+0200
\r\n
TZOFFSETTO:+0300
\r\n
TZNAME:EEST
\r\n
DTSTART:20180324T010000
\r\n
RDATE:20180324T010000
\r\n
RDATE:20190329T000000
\r\n
END:DAYLIGHT"
,
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+0300
\r\n
TZOFFSETTO:+0200
\r\n
TZNAME:EET
\r\n
DTSTART:19700101T000000
\r\n
RDATE:19700101T000000
\r\n
RDATE:20181027T010000
\r\n
RDATE:20191026T000000
\r\n
END:STANDARD"
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+0300
\r\n
TZOFFSETTO:+0200
\r\n
TZNAME:EET
\r\n
DTSTART:19700101T000000
\r\n
RDATE:19700101T000000
\r\n
RDATE:20181027T010000
\r\n
RDATE:20191026T000000
\r\
n
RDATE:20201024T010000
\r\
n
END:STANDARD"
],
"latitude"
:
"+0313000"
,
"longitude"
:
"+0342800"
...
...
@@ -2287,9 +2287,9 @@
"Asia/Hebron"
:
{
"ics"
:
[
"BEGIN:DAYLIGHT
\r\n
TZOFFSETFROM:+0200
\r\n
TZOFFSETTO:+0300
\r\n
TZNAME:EEST
\r\n
DTSTART:20200328T000000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=3;BYMONTHDAY=24,25,26,27,28,29,30;BYDAY=SA
\r\n
END:DAYLIGHT"
,
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+0
3
00
\r\n
TZOFFSETTO:+0200
\r\n
TZNAME:EET
\r\n
DTSTART:202
0
102
4
T010000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=10;BY
MONTHDAY=24,25,26,27,28,29,30;BYDAY=SA
\r\n
END:STANDARD"
,
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+0
2
00
\r\n
TZOFFSETTO:+0200
\r\n
TZNAME:EET
\r\n
DTSTART:202
1
102
9
T010000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=10;BY
DAY=-1FR
\r\n
END:STANDARD"
,
"BEGIN:DAYLIGHT
\r\n
TZOFFSETFROM:+0200
\r\n
TZOFFSETTO:+0300
\r\n
TZNAME:EEST
\r\n
DTSTART:20180324T010000
\r\n
RDATE:20180324T010000
\r\n
RDATE:20190329T000000
\r\n
END:DAYLIGHT"
,
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+0300
\r\n
TZOFFSETTO:+0200
\r\n
TZNAME:EET
\r\n
DTSTART:19700101T000000
\r\n
RDATE:19700101T000000
\r\n
RDATE:20181027T010000
\r\n
RDATE:20191026T000000
\r\n
END:STANDARD"
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+0300
\r\n
TZOFFSETTO:+0200
\r\n
TZNAME:EET
\r\n
DTSTART:19700101T000000
\r\n
RDATE:19700101T000000
\r\n
RDATE:20181027T010000
\r\n
RDATE:20191026T000000
\r\
n
RDATE:20201024T010000
\r\
n
END:STANDARD"
],
"latitude"
:
"+0313200"
,
"longitude"
:
"+0350542"
...
...
@@ -3475,9 +3475,10 @@
},
"Pacific/Fiji"
:
{
"ics"
:
[
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+1300
\r\n
TZOFFSETTO:+1200
\r\n
TZNAME:+12
\r\n
DTSTART:19700118T030000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=12,13,14,15,16,17,18;BYDAY=SU
\r\n
END:STANDARD"
,
"BEGIN:DAYLIGHT
\r\n
TZOFFSETFROM:+1200
\r\n
TZOFFSETTO:+1300
\r\n
TZNAME:+13
\r\n
DTSTART:20211114T020000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=2SU
\r\n
END:DAYLIGHT"
,
"BEGIN:DAYLIGHT
\r\n
TZOFFSETFROM:+1200
\r\n
TZOFFSETTO:+1300
\r\n
TZNAME:+13
\r\n
DTSTART:20181104T020000
\r\n
RDATE:20181104T020000
\r\n
RDATE:20191110T020000
\r\n
RDATE:20201220T020000
\r\n
END:DAYLIGHT"
"BEGIN:DAYLIGHT
\r\n
TZOFFSETFROM:+1200
\r\n
TZOFFSETTO:+1300
\r\n
TZNAME:+13
\r\n
DTSTART:20221113T020000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=2SU
\r\n
END:DAYLIGHT"
,
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+1300
\r\n
TZOFFSETTO:+1200
\r\n
TZNAME:+12
\r\n
DTSTART:20230115T030000
\r\n
RRULE:FREQ=YEARLY;BYMONTH=1;BYMONTHDAY=12,13,14,15,16,17,18;BYDAY=SU
\r\n
END:STANDARD"
,
"BEGIN:DAYLIGHT
\r\n
TZOFFSETFROM:+1200
\r\n
TZOFFSETTO:+1300
\r\n
TZNAME:+13
\r\n
DTSTART:19700101T000000
\r\n
RDATE:19700101T000000
\r\n
RDATE:20181104T020000
\r\n
RDATE:20191110T020000
\r\n
RDATE:20201220T020000
\r\n
END:DAYLIGHT"
,
"BEGIN:STANDARD
\r\n
TZOFFSETFROM:+1300
\r\n
TZOFFSETTO:+1200
\r\n
TZNAME:+12
\r\n
DTSTART:20180114T030000
\r\n
RDATE:20180114T030000
\r\n
RDATE:20190113T030000
\r\n
RDATE:20200112T030000
\r\n
RDATE:20210117T030000
\r\n
END:STANDARD"
],
"latitude"
:
"-0180800"
,
"longitude"
:
"+1782500"
...
...
comm/chat/content/chat-tooltip.js
View file @
c5b36d3e
...
...
@@ -97,6 +97,12 @@
`[tooltip="
${
this
.
id
}
"] richlistitem`
);
// No tooltip on search results
if
(
item
?.
hasAttribute
(
"
is-search-result
"
))
{
return
false
;
}
// No tooltip on the group headers
if
(
item
&&
item
.
matches
(
`:scope[is="chat-group-richlistitem"]`
))
{
return
false
;
}
...
...
comm/chat/protocols/matrix/lib/@matrix-org/olm/olm.js
View file @
c5b36d3e
This diff is collapsed.
Click to expand it.
comm/chat/protocols/matrix/lib/@matrix-org/olm/olm.wasm
View file @
c5b36d3e
No preview for this file type
comm/chat/protocols/matrix/lib/README.md
View file @
c5b36d3e
...
...
@@ -3,7 +3,7 @@ at https://github.com/matrix-org/matrix-js-sdk/. Current version is v11.1.0.
The following npm dependencies are included:
*
@matrix-org/olm: https://gitlab.matrix.org/matrix-org/olm/-/packages/10 v3.2.
3
*
@matrix-org/olm: https://gitlab.matrix.org/matrix-org/olm/-/packages/10 v3.2.
8
*
another-json: https://www.npmjs.com/package/another-json/ v0.2.0
*
base-x: https://www.npmjs.com/package/base-x v3.0.8
*
bs58: https://www.npmjs.com/package/bs58 v4.0.1
...
...
comm/mail/base/content/mailCore.js
View file @
c5b36d3e
...
...
@@ -349,6 +349,13 @@ function onViewToolbarsPopupShowing(
}
let
popup
=
event
.
target
.
querySelector
(
"
.panel-subview-body
"
)
||
event
.
target
;
// Limit the toolbar menu entries to the first level of context menus.
if
(
popup
!=
event
.
currentTarget
&&
event
.
currentTarget
.
tagName
==
"
menupopup
"
)
{
return
;
}
// Remove all collapsible nodes from the menu.
for
(
let
i
=
popup
.
children
.
length
-
1
;
i
>=
0
;
--
i
)
{
...
...
comm/mail/base/content/msgHdrView.js
View file @
c5b36d3e
...
...
@@ -37,6 +37,12 @@ XPCOMUtils.defineLazyServiceGetter(
"
@mozilla.org/mime;1
"
,
"
nsIMIMEService
"
);
XPCOMUtils
.
defineLazyServiceGetter
(
this
,
"
gHandlerService
"
,
"
@mozilla.org/uriloader/handler-service;1
"
,
"
nsIHandlerService
"
);
// Warning: It's critical that the code in here for displaying the message
// headers for a selected message remain as fast as possible. In particular,
...
...
@@ -1952,12 +1958,140 @@ AttachmentInfo.prototype = {
// If no tabmail, open PDF same as other attachments.
}
}
messenger
.
openAttachment
(
// Just use the old method for handling messages, it works.
if
(
this
.
contentType
==
"
message/rfc822
"
)
{
messenger
.
openAttachment
(
this
.
contentType
,
this
.
url
,
encodeURIComponent
(
this
.
name
),
this
.
uri
,
this
.
isExternalAttachment
);
return
;
}
// Get the MIME info from the service.
let
match
=
this
.
name
.
match
(
/
\.([^
.
]
+
)
$/
);
let
extension
=
match
?
match
[
1
]
:
null
;
let
mimeInfo
=
gMIMEService
.
getFromTypeAndExtension
(
this
.
contentType
,
this
.
url
,
encodeURIComponent
(
this
.
name
),
this
.
uri
,
this
.
isExternalAttachment
extension
);
// The default action is saveToDisk, which is not what we want.
// If we don't have a stored handler, ask before handling.
if
(
!
gHandlerService
.
exists
(
mimeInfo
))
{
mimeInfo
.
alwaysAskBeforeHandling
=
true
;
mimeInfo
.
preferredAction
=
Ci
.
nsIHandlerInfo
.
alwaysAsk
;
}
// If we know what to do, do it.
let
{
name
,
url
}
=
this
;
async
function
saveToFile
(
path
)
{
let
buffer
=
await
new
Promise
(
function
(
resolve
,
reject
)
{
NetUtil
.
asyncFetch
(
{
uri
:
Services
.
io
.
newURI
(
url
),
loadUsingSystemPrincipal
:
true
,
},
function
(
inputStream
,
status
)
{
if
(
Components
.
isSuccessCode
(
status
))
{
resolve
(
NetUtil
.
readInputStream
(
inputStream
));
}
else
{
reject
(
new
Components
.
Exception
(
"
Failed to fetch attachment
"
,
status
)
);
}
}
);
});
await
IOUtils
.
write
(
path
,
new
Uint8Array
(
buffer
));
}
async
function
saveAndOpen
(
mimeInfo
)
{
let
tempFile
=
Services
.
dirsvc
.
get
(
"
TmpD
"
,
Ci
.
nsIFile
);
tempFile
.
append
(
name
);
tempFile
.
createUnique
(
Ci
.
nsIFile
.
NORMAL_FILE_TYPE
,
0o755
);
tempFile
.
remove
(
false
);
Cc
[
"
@mozilla.org/mime;1
"
]
.
getService
(
Ci
.
nsPIExternalAppLauncher
)
.
deleteTemporaryFileOnExit
(
tempFile
);
await
saveToFile
(
tempFile
.
path
);
mimeInfo
.
launchWithFile
(
tempFile
);
}
if
(
!
mimeInfo
.
alwaysAskBeforeHandling
)
{
switch
(
mimeInfo
.
preferredAction
)
{
case
Ci
.
nsIHandlerInfo
.
saveToDisk
:
if
(
Services
.
prefs
.
getBoolPref
(
"
browser.download.useDownloadDir
"
))
{
let
destFile
=
new
FileUtils
.
File
(
await
Downloads
.
getPreferredDownloadsDirectory
()
);
destFile
.
append
(
name
);
destFile
.
createUnique
(
Ci
.
nsIFile
.
NORMAL_FILE_TYPE
,
0o755
);
destFile
.
remove
(
false
);
await
saveToFile
(
destFile
.
path
);
}
else
{
let
filePicker
=
Cc
[
"
@mozilla.org/filepicker;1
"
].
createInstance
(
Ci
.
nsIFilePicker
);
filePicker
.
init
(
window
,
"
title
"
,
Ci
.
nsIFilePicker
.
modeSave
);
let
rv
=
await
new
Promise
(
resolve
=>
filePicker
.
open
(
resolve
));
if
(
rv
!=
Ci
.
nsIFilePicker
.
returnCancel
)
{
await
saveToFile
(
filePicker
.
file
.
path
);
}
}
return
;
case
Ci
.
nsIHandlerInfo
.
useHelperApp
:
case
Ci
.
nsIHandlerInfo
.
useSystemDefault
:
await
saveAndOpen
(
mimeInfo
);
return
;
}
}
// Ask what to do, then do it.
let
appLauncherDialog
=
Cc
[
"
@mozilla.org/helperapplauncherdialog;1
"
].
createInstance
(
Ci
.
nsIHelperAppLauncherDialog
);
appLauncherDialog
.
show
(
{
QueryInterface
:
ChromeUtils
.
generateQI
([
"
nsIHelperAppLauncher
"
]),
MIMEInfo
:
mimeInfo
,
source
:
Services
.
io
.
newURI
(
this
.
url
),
suggestedFileName
:
this
.
name
,
cancel
(
reason
)
{},
promptForSaveDestination
()
{
appLauncherDialog
.
promptForSaveToFileAsync
(
this
,
window
,
this
.
suggestedFileName
,
extension
,
false
);
},
async
launchWithApplication
(
handleInternally
,
file
)
{
await
saveAndOpen
(
mimeInfo
);
},
async
saveDestinationAvailable
(
file
)
{
if
(
file
)
{
await
saveToFile
(
file
.
path
);
}
},
setWebProgressListener
(
webProgressListener
)
{},
targetFile
:
null
,
targetFileIsExecutable
:
null
,
timeDownloadStarted
:
null
,
contentLength
:
this
.
size
,
browsingContextId
:
null
,
},
window
,
null
);
}
},
...
...
@@ -2707,10 +2841,6 @@ function updateAttachmentsDisplay(attachmentInfo, isFetching) {
if
(
isFetching
)
{
// Set elements busy to show the user this is potentially a long network
// fetch for the link attachment.
attachmentIcon
.
setAttribute
(
"
src
"
,
"
chrome://global/skin/icons/loading.png
"
);
attachmentList
.
setAttachmentLoaded
(
attachmentItem
,
false
);
return
;
}
...
...
comm/mail/base/content/troubleshootMode.js
View file @
c5b36d3e
...
...
@@ -3,10 +3,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var
{
AddonManager
}
=
ChromeUtils
.
import
(
"
resource://gre/modules/AddonManager.jsm
"
);
var
{
Services
}
=
ChromeUtils
.
import
(
"
resource://gre/modules/Services.jsm
"
);
var
{
XPIDatabase
}
=
ChromeUtils
.
import
(
"
resource://gre/modules/addons/XPIDatabase.jsm
"
);
function
restartApp
()
{
Services
.
startup
.
quit
(
...
...
@@ -24,39 +24,34 @@ function deleteLocalstore() {
}
async
function
disableAddons
()
{
for
(
let
addon
of
await
AddonManager
.
getAllAddons
())
{
XPIDatabase
.
syncLoadDB
(
false
);
let
addons
=
XPIDatabase
.
getAddons
();
for
(
let
addon
of
addons
)
{
if
(
addon
.
type
==
"
theme
"
)
{
// Setting userDisabled to false on the default theme activates it,
// disables all other themes and deactivates the applied persona, if
// any.
const
DEFAULT_THEME_ID
=
"
{972ce4c6-7e08-4474-a285-3208198ce6fd}
"
;
const
DEFAULT_THEME_ID
=
"
default-theme@mozilla.org
"
;
if
(
addon
.
id
==
DEFAULT_THEME_ID
)
{
addon
.
userDisabled
=
false
;
await
XPIDatabase
.
updateAddonDisabledState
(
addon
,
{
userDisabled
:
false
,
});
}
}
else
{
a
ddon
.
userDisabled
=
true
;
a
wait
XPIDatabase
.
updateAddonDisabledState
(
addon
,
{
userDisabled
:
true
})
;
}
}
restartApp
();
}
function
onOK
(
event
)
{
try
{
if
(
document
.
getElementById
(
"
resetToolbars
"
).
checked
)
{
deleteLocalstore
();
}
if
(
document
.
getElementById
(
"
disableAddons
"
).
checked
)
{
disableAddons
();
// disableAddons will asynchronously restart the application
event
.
preventDefault
();
return
;
}
}
catch
(
e
)
{
Cu
.
reportError
(
e
);
async
function
onOK
(
event
)
{
event
.
preventDefault
();
if
(
document
.
getElementById
(
"
resetToolbars
"
).
checked
)
{
deleteLocalstore
();
}
if
(
document
.
getElementById
(
"
disableAddons
"
).
checked
)
{
await
disableAddons
();
}
restartApp
();
event
.
preventDefault
();
}
function
onCancel
()
{
...
...
comm/mail/base/content/widgets/mailWidgets.js
View file @
c5b36d3e
...
...
@@ -1718,6 +1718,10 @@
let
type
=
attachment
.
contentType
;
if
(
type
==
"
text/x-moz-deleted
"
)
{
src
=
"
chrome://messenger/skin/icons/attachment-deleted.svg
"
;
}
else
if
(
!
item
.
loaded
||
item
.
uploading
)
{
src
=
"
chrome://global/skin/icons/loading.png
"
;
}
else
if
(
item
.
cloudIcon
)
{
src
=
item
.
cloudIcon
;
}
else
{
let
iconName
=
attachment
.
name
;
if
(
iconName
.
toLowerCase
().
endsWith
(
"
.eml
"
))
{
...
...
@@ -1768,23 +1772,23 @@
*
* @param {MozRichlistitem} item - The attachment item.
* @param {boolean} loaded - Whether the attachment is fully loaded.
* @param {string} [cloudIcon] - The icon for the cloud provider where the
* attachment was loaded, if any.
*/
setAttachmentLoaded
(
item
,
loaded
,
cloudIcon
)
{
setAttachmentLoaded
(
item
,
loaded
)
{
item
.
loaded
=
loaded
;
if
(
loaded
)
{
if
(
cloudIcon
!==
undefined
)
{
this
.
setAttachmentIconSrc
(
item
,
cloudIcon
);
}
else
{
this
.
refreshAttachmentIcon
(
item
);
}
}
else
{
this
.
setAttachmentIconSrc
(
item
,
"
chrome://global/skin/icons/loading.png
"
);
}
this
.
refreshAttachmentIcon
(
item
);
}
/**
* Set the attachment item's cloud icon, if any.
*
* @param {MozRichlistitem} item - The attachment item.
* @param {?string} cloudIcon - The icon of the cloud provider where the
* attachment was uploaded. Will be used as file type icon in the list of
* attachments, if specified.
*/
setCloudIcon
(
item
,
cloudIcon
)
{
item
.
cloudIcon
=
cloudIcon
;
this
.
refreshAttachmentIcon
(
item
);
}
invalidateItem
(
item
,
name
)
{
...
...
comm/mail/components/accountcreation/FetchHTTP.jsm
View file @
c5b36d3e
...
...
@@ -214,7 +214,13 @@ FetchHTTP.prototype = {
// workaround, because open(..., username, password) does not work.
request.setRequestHeader(
"Authorization",
"Basic " + btoa(username + ":" + password)
"Basic " +
btoa(
// btoa() takes a BinaryString.
String.fromCharCode(
...new TextEncoder().encode(username + ":" + password)
)
)
);
}
for (let name in this._args.headers) {
...
...
comm/mail/components/accountcreation/content/accountSetup.js
View file @
c5b36d3e
...
...
@@ -1437,6 +1437,7 @@ var gAccountSetup = {
let
smtpHostname
=
document
.
getElementById
(
"
outgoingHostname
"
).
value
;
let
smtpPort
=
document
.
getElementById
(
"
outgoingPort
"
).
value
;
let
foundServer
=
MailServices
.
smtp
.
servers
.
find
(
// XXX: should really match on socketType as well
s
=>
s
.
hostname
==
smtpHostname
&&
s
.
port
==
smtpPort
);
// If the user is using a preconfigured SMTP server.
...
...
@@ -1636,29 +1637,21 @@ var gAccountSetup = {
// Bail out if a port number is already defined and it's not part of the
// known ports array.
<