mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-31 11:37:30 +09:00
Merge remote-tracking branch 'origin/master' into custom
This commit is contained in:
commit
e075f1b671
21 changed files with 507 additions and 108 deletions
|
|
@ -1051,16 +1051,18 @@ function formatNumber(number)
|
||||||
|
|
||||||
function formatDate(datestr, unknown)
|
function formatDate(datestr, unknown)
|
||||||
{
|
{
|
||||||
|
// scriptable date formatter, for pretty printing dates
|
||||||
|
var dateService = Components.classes["@mozilla.org/intl/scriptabledateformat;1"]
|
||||||
|
.getService(Components.interfaces.nsIScriptableDateFormat);
|
||||||
|
|
||||||
var date = new Date(datestr);
|
var date = new Date(datestr);
|
||||||
if (!date.valueOf())
|
if (!date.valueOf())
|
||||||
return unknown;
|
return unknown;
|
||||||
|
|
||||||
const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
return dateService.FormatDateTime("", dateService.dateFormatLong,
|
||||||
.getService(Components.interfaces.nsIXULChromeRegistry)
|
dateService.timeFormatSeconds,
|
||||||
.getSelectedLocale("global", true);
|
date.getFullYear(), date.getMonth()+1, date.getDate(),
|
||||||
const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
|
date.getHours(), date.getMinutes(), date.getSeconds());
|
||||||
hour: 'numeric', minute: 'numeric', second: 'numeric' };
|
|
||||||
return date.toLocaleString(locale, dtOptions);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function doCopy()
|
function doCopy()
|
||||||
|
|
|
||||||
|
|
@ -185,20 +185,11 @@ FeedWriter.prototype = {
|
||||||
if (!dateObj.getTime())
|
if (!dateObj.getTime())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return this._dateFormatter.format(dateObj);
|
let dateService = Cc["@mozilla.org/intl/scriptabledateformat;1"].
|
||||||
},
|
getService(Ci.nsIScriptableDateFormat);
|
||||||
|
return dateService.FormatDateTime("", dateService.dateFormatLong, dateService.timeFormatNoSeconds,
|
||||||
__dateFormatter: null,
|
dateObj.getFullYear(), dateObj.getMonth()+1, dateObj.getDate(),
|
||||||
get _dateFormatter() {
|
dateObj.getHours(), dateObj.getMinutes(), dateObj.getSeconds());
|
||||||
if (!this.__dateFormatter) {
|
|
||||||
const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
|
||||||
.getService(Ci.nsIXULChromeRegistry)
|
|
||||||
.getSelectedLocale("global", true);
|
|
||||||
const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
|
|
||||||
hour: 'numeric', minute: 'numeric' };
|
|
||||||
this.__dateFormatter = new Intl.DateTimeFormat(locale, dtOptions);
|
|
||||||
}
|
|
||||||
return this.__dateFormatter;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -409,11 +409,8 @@ var PlacesOrganizer = {
|
||||||
populateRestoreMenu: function() {
|
populateRestoreMenu: function() {
|
||||||
let restorePopup = document.getElementById("fileRestorePopup");
|
let restorePopup = document.getElementById("fileRestorePopup");
|
||||||
|
|
||||||
const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
let dateSvc = Cc["@mozilla.org/intl/scriptabledateformat;1"].
|
||||||
.getService(Ci.nsIXULChromeRegistry)
|
getService(Ci.nsIScriptableDateFormat);
|
||||||
.getSelectedLocale("global", true);
|
|
||||||
const dtOptions = { year: 'numeric', month: 'long', day: 'numeric' };
|
|
||||||
let dateFormatter = new Intl.DateTimeFormat(locale, dtOptions);
|
|
||||||
|
|
||||||
// Remove existing menu items. Last item is the restoreFromFile item.
|
// Remove existing menu items. Last item is the restoreFromFile item.
|
||||||
while (restorePopup.childNodes.length > 1)
|
while (restorePopup.childNodes.length > 1)
|
||||||
|
|
@ -445,7 +442,13 @@ var PlacesOrganizer = {
|
||||||
let backupDate = PlacesBackups.getDateForFile(backupFiles[i]);
|
let backupDate = PlacesBackups.getDateForFile(backupFiles[i]);
|
||||||
let m = restorePopup.insertBefore(document.createElement("menuitem"),
|
let m = restorePopup.insertBefore(document.createElement("menuitem"),
|
||||||
document.getElementById("restoreFromFile"));
|
document.getElementById("restoreFromFile"));
|
||||||
m.setAttribute("label", dateFormatter.format(backupDate) + sizeInfo);
|
m.setAttribute("label",
|
||||||
|
dateSvc.FormatDate("",
|
||||||
|
Ci.nsIScriptableDateFormat.dateFormatLong,
|
||||||
|
backupDate.getFullYear(),
|
||||||
|
backupDate.getMonth() + 1,
|
||||||
|
backupDate.getDate()) +
|
||||||
|
sizeInfo);
|
||||||
m.setAttribute("value", OS.Path.basename(backupFiles[i]));
|
m.setAttribute("value", OS.Path.basename(backupFiles[i]));
|
||||||
m.setAttribute("oncommand",
|
m.setAttribute("oncommand",
|
||||||
"PlacesOrganizer.onRestoreMenuItemClick(this);");
|
"PlacesOrganizer.onRestoreMenuItemClick(this);");
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,15 @@ PlacesTreeView.prototype = {
|
||||||
return this.__xulStore;
|
return this.__xulStore;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
__dateService: null,
|
||||||
|
get _dateService() {
|
||||||
|
if (!this.__dateService) {
|
||||||
|
this.__dateService = Cc["@mozilla.org/intl/scriptabledateformat;1"].
|
||||||
|
getService(Ci.nsIScriptableDateFormat);
|
||||||
|
}
|
||||||
|
return this.__dateService;
|
||||||
|
},
|
||||||
|
|
||||||
QueryInterface: XPCOMUtils.generateQI(PTV_interfaces),
|
QueryInterface: XPCOMUtils.generateQI(PTV_interfaces),
|
||||||
|
|
||||||
// Bug 761494:
|
// Bug 761494:
|
||||||
|
|
@ -495,36 +504,16 @@ PlacesTreeView.prototype = {
|
||||||
let midnight = now - (now % MS_PER_DAY);
|
let midnight = now - (now % MS_PER_DAY);
|
||||||
midnight += new Date(midnight).getTimezoneOffset() * MS_PER_MINUTE;
|
midnight += new Date(midnight).getTimezoneOffset() * MS_PER_MINUTE;
|
||||||
|
|
||||||
|
let dateFormat = timeMs >= midnight ?
|
||||||
|
Ci.nsIScriptableDateFormat.dateFormatNone :
|
||||||
|
Ci.nsIScriptableDateFormat.dateFormatShort;
|
||||||
|
|
||||||
let timeObj = new Date(timeMs);
|
let timeObj = new Date(timeMs);
|
||||||
return timeMs >= midnight ? this._todayFormatter.format(timeObj)
|
return (this._dateService.FormatDateTime("", dateFormat,
|
||||||
: this._dateFormatter.format(timeObj);
|
Ci.nsIScriptableDateFormat.timeFormatNoSeconds,
|
||||||
},
|
timeObj.getFullYear(), timeObj.getMonth() + 1,
|
||||||
|
timeObj.getDate(), timeObj.getHours(),
|
||||||
// We use a different formatter for times within the current day,
|
timeObj.getMinutes(), timeObj.getSeconds()));
|
||||||
// so we cache both a "today" formatter and a general date formatter.
|
|
||||||
__todayFormatter: null,
|
|
||||||
get _todayFormatter() {
|
|
||||||
if (!this.__todayFormatter) {
|
|
||||||
const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
|
||||||
.getService(Ci.nsIXULChromeRegistry)
|
|
||||||
.getSelectedLocale("global", true);
|
|
||||||
const dtOptions = { hour: 'numeric', minute: 'numeric' };
|
|
||||||
this.__todayFormatter = new Intl.DateTimeFormat(locale, dtOptions);
|
|
||||||
}
|
|
||||||
return this.__todayFormatter;
|
|
||||||
},
|
|
||||||
|
|
||||||
__dateFormatter: null,
|
|
||||||
get _dateFormatter() {
|
|
||||||
if (!this.__dateFormatter) {
|
|
||||||
const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
|
|
||||||
.getService(Ci.nsIXULChromeRegistry)
|
|
||||||
.getSelectedLocale("global", true);
|
|
||||||
const dtOptions = { year: 'numeric', month: 'numeric', day: 'numeric',
|
|
||||||
hour: 'numeric', minute: 'numeric' };
|
|
||||||
this.__dateFormatter = new Intl.DateTimeFormat(locale, dtOptions);
|
|
||||||
}
|
|
||||||
return this.__dateFormatter;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
COLUMN_TYPE_UNKNOWN: 0,
|
COLUMN_TYPE_UNKNOWN: 0,
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ XPCOMUtils.defineLazyModuleGetter(this, "ContextualIdentityService",
|
||||||
var gCookiesWindow = {
|
var gCookiesWindow = {
|
||||||
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
|
_cm : Components.classes["@mozilla.org/cookiemanager;1"]
|
||||||
.getService(Components.interfaces.nsICookieManager),
|
.getService(Components.interfaces.nsICookieManager),
|
||||||
|
_ds : Components.classes["@mozilla.org/intl/scriptabledateformat;1"]
|
||||||
|
.getService(Components.interfaces.nsIScriptableDateFormat),
|
||||||
_hosts : {},
|
_hosts : {},
|
||||||
_hostOrder : [],
|
_hostOrder : [],
|
||||||
_tree : null,
|
_tree : null,
|
||||||
|
|
@ -514,12 +516,14 @@ var gCookiesWindow = {
|
||||||
formatExpiresString: function (aExpires) {
|
formatExpiresString: function (aExpires) {
|
||||||
if (aExpires) {
|
if (aExpires) {
|
||||||
var date = new Date(1000 * aExpires);
|
var date = new Date(1000 * aExpires);
|
||||||
const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
return this._ds.FormatDateTime("", this._ds.dateFormatLong,
|
||||||
.getService(Components.interfaces.nsIXULChromeRegistry)
|
this._ds.timeFormatSeconds,
|
||||||
.getSelectedLocale("global", true);
|
date.getFullYear(),
|
||||||
const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
|
date.getMonth() + 1,
|
||||||
hour: 'numeric', minute: 'numeric', second: 'numeric' };
|
date.getDate(),
|
||||||
return date.toLocaleString(locale, dtOptions);
|
date.getHours(),
|
||||||
|
date.getMinutes(),
|
||||||
|
date.getSeconds());
|
||||||
}
|
}
|
||||||
return this._bundle.getString("expireAtEndOfSession");
|
return this._bundle.getString("expireAtEndOfSession");
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -5897,7 +5897,12 @@ var OfflineApps = {
|
||||||
var cacheService = Cc["@mozilla.org/network/application-cache-service;1"]
|
var cacheService = Cc["@mozilla.org/network/application-cache-service;1"]
|
||||||
.getService(Ci.nsIApplicationCacheService);
|
.getService(Ci.nsIApplicationCacheService);
|
||||||
if (!groups) {
|
if (!groups) {
|
||||||
groups = cacheService.getGroups();
|
try {
|
||||||
|
groups = cacheService.getGroups();
|
||||||
|
} catch(ex) {
|
||||||
|
// Cache disabled.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var usage = 0;
|
var usage = 0;
|
||||||
|
|
|
||||||
|
|
@ -283,7 +283,11 @@ var gAdvancedPane = {
|
||||||
Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
|
Components.classes["@mozilla.org/netwerk/cache-storage-service;1"]
|
||||||
.getService(Components.interfaces.nsICacheStorageService);
|
.getService(Components.interfaces.nsICacheStorageService);
|
||||||
var storage = cacheService.appCacheStorage(LoadContextInfo.default, null);
|
var storage = cacheService.appCacheStorage(LoadContextInfo.default, null);
|
||||||
storage.asyncVisitStorage(visitor, false);
|
try {
|
||||||
|
storage.asyncVisitStorage(visitor, false);
|
||||||
|
} catch(ex) {
|
||||||
|
// Service unavailable: user most likely crippled the cache.
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
updateCacheSizeUI: function(smartSizeEnabled)
|
updateCacheSizeUI: function(smartSizeEnabled)
|
||||||
|
|
@ -393,8 +397,14 @@ var gAdvancedPane = {
|
||||||
{
|
{
|
||||||
var cacheService = Components.classes["@mozilla.org/network/application-cache-service;1"].
|
var cacheService = Components.classes["@mozilla.org/network/application-cache-service;1"].
|
||||||
getService(Components.interfaces.nsIApplicationCacheService);
|
getService(Components.interfaces.nsIApplicationCacheService);
|
||||||
if (!groups)
|
if (!groups) {
|
||||||
groups = cacheService.getGroups();
|
try {
|
||||||
|
groups = cacheService.getGroups();
|
||||||
|
} catch(ex) {
|
||||||
|
// Cache disabled.
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var ios = Components.classes["@mozilla.org/network/io-service;1"].
|
var ios = Components.classes["@mozilla.org/network/io-service;1"].
|
||||||
getService(Components.interfaces.nsIIOService);
|
getService(Components.interfaces.nsIIOService);
|
||||||
|
|
@ -426,27 +436,33 @@ var gAdvancedPane = {
|
||||||
|
|
||||||
var cacheService = Components.classes["@mozilla.org/network/application-cache-service;1"].
|
var cacheService = Components.classes["@mozilla.org/network/application-cache-service;1"].
|
||||||
getService(Components.interfaces.nsIApplicationCacheService);
|
getService(Components.interfaces.nsIApplicationCacheService);
|
||||||
var groups = cacheService.getGroups();
|
|
||||||
|
try {
|
||||||
|
var groups = cacheService.getGroups();
|
||||||
|
|
||||||
var bundle = document.getElementById("bundlePreferences");
|
var bundle = document.getElementById("bundlePreferences");
|
||||||
|
|
||||||
var enumerator = pm.enumerator;
|
var enumerator = pm.enumerator;
|
||||||
while (enumerator.hasMoreElements()) {
|
while (enumerator.hasMoreElements()) {
|
||||||
var perm = enumerator.getNext().QueryInterface(Components.interfaces.nsIPermission);
|
var perm = enumerator.getNext().QueryInterface(Components.interfaces.nsIPermission);
|
||||||
if (perm.type == "offline-app" &&
|
if (perm.type == "offline-app" &&
|
||||||
perm.capability != Components.interfaces.nsIPermissionManager.DEFAULT_ACTION &&
|
perm.capability != Components.interfaces.nsIPermissionManager.DEFAULT_ACTION &&
|
||||||
perm.capability != Components.interfaces.nsIPermissionManager.DENY_ACTION) {
|
perm.capability != Components.interfaces.nsIPermissionManager.DENY_ACTION) {
|
||||||
var row = document.createElement("listitem");
|
var row = document.createElement("listitem");
|
||||||
row.id = "";
|
row.id = "";
|
||||||
row.className = "offlineapp";
|
row.className = "offlineapp";
|
||||||
row.setAttribute("origin", perm.principal.origin);
|
row.setAttribute("origin", perm.principal.origin);
|
||||||
var converted = DownloadUtils.
|
var converted = DownloadUtils.
|
||||||
convertByteUnits(this._getOfflineAppUsage(perm, groups));
|
convertByteUnits(this._getOfflineAppUsage(perm, groups));
|
||||||
row.setAttribute("usage",
|
row.setAttribute("usage",
|
||||||
bundle.getFormattedString("offlineAppUsage",
|
bundle.getFormattedString("offlineAppUsage",
|
||||||
converted));
|
converted));
|
||||||
list.appendChild(row);
|
list.appendChild(row);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} catch(ex) {
|
||||||
|
// Cache service unavailable/errored, off-line app cache is disabled or 0
|
||||||
|
// Do nothing, just leave the box blank.
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ exports.menuitems = [
|
||||||
},
|
},
|
||||||
key: {
|
key: {
|
||||||
id: "browserToolbox",
|
id: "browserToolbox",
|
||||||
modifiers: isMac ? "accel,alt" : "accel,shift",
|
modifiers: "accel,alt,shift",
|
||||||
keytext: true
|
keytext: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,9 @@
|
||||||
backface-visibility: inherit;
|
backface-visibility: inherit;
|
||||||
clip: inherit;
|
clip: inherit;
|
||||||
/* When the table wrapper is a Flex/Grid item we need these: */
|
/* When the table wrapper is a Flex/Grid item we need these: */
|
||||||
|
flex-grow: inherit;
|
||||||
|
flex-shrink: inherit;
|
||||||
|
flex-basis: inherit;
|
||||||
align-self: inherit;
|
align-self: inherit;
|
||||||
justify-self: inherit;
|
justify-self: inherit;
|
||||||
grid-column-start: inherit;
|
grid-column-start: inherit;
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,7 @@ int16_t gBadPortList[] = {
|
||||||
42, // name
|
42, // name
|
||||||
43, // nicname
|
43, // nicname
|
||||||
53, // domain
|
53, // domain
|
||||||
|
69, // TFTP
|
||||||
77, // priv-rjs
|
77, // priv-rjs
|
||||||
79, // finger
|
79, // finger
|
||||||
87, // ttylink
|
87, // ttylink
|
||||||
|
|
@ -125,8 +126,10 @@ int16_t gBadPortList[] = {
|
||||||
119, // nntp
|
119, // nntp
|
||||||
123, // NTP
|
123, // NTP
|
||||||
135, // loc-srv / epmap
|
135, // loc-srv / epmap
|
||||||
|
137, // netbios
|
||||||
139, // netbios
|
139, // netbios
|
||||||
143, // imap2
|
143, // imap2
|
||||||
|
161, // SNMP
|
||||||
179, // BGP
|
179, // BGP
|
||||||
389, // ldap
|
389, // ldap
|
||||||
465, // smtp+ssl
|
465, // smtp+ssl
|
||||||
|
|
@ -138,24 +141,32 @@ int16_t gBadPortList[] = {
|
||||||
530, // courier
|
530, // courier
|
||||||
531, // Chat
|
531, // Chat
|
||||||
532, // netnews
|
532, // netnews
|
||||||
540, // uucp
|
540, // uucp
|
||||||
|
554, // rtsp
|
||||||
556, // remotefs
|
556, // remotefs
|
||||||
563, // nntp+ssl
|
563, // nntp+ssl
|
||||||
587, //
|
587, // smtp (outgoing)
|
||||||
601, //
|
601, // syslog-conn
|
||||||
636, // ldap+ssl
|
636, // ldap+ssl
|
||||||
993, // imap+ssl
|
993, // imap+ssl
|
||||||
995, // pop3+ssl
|
995, // pop3+ssl
|
||||||
|
1719, // h323 (RAS)
|
||||||
|
1720, // h323 (hostcall)
|
||||||
|
1723, // pptp
|
||||||
2049, // nfs
|
2049, // nfs
|
||||||
3659, // apple-sasl / PasswordServer
|
3659, // apple-sasl / PasswordServer
|
||||||
4045, // lockd
|
4045, // lockd
|
||||||
|
5060, // sip
|
||||||
|
5061, // sips
|
||||||
6000, // x11
|
6000, // x11
|
||||||
6665, // Alternate IRC [Apple addition]
|
6566, // SANE
|
||||||
6666, // Alternate IRC [Apple addition]
|
6665, // Alternate IRC [Apple addition]
|
||||||
6667, // Standard IRC [Apple addition]
|
6666, // Alternate IRC [Apple addition]
|
||||||
6668, // Alternate IRC [Apple addition]
|
6667, // Standard IRC [Apple addition]
|
||||||
6669, // Alternate IRC [Apple addition]
|
6668, // Alternate IRC [Apple addition]
|
||||||
0, // This MUST be zero so that we can populating the array
|
6669, // Alternate IRC [Apple addition]
|
||||||
|
10080,// Amanda
|
||||||
|
0, // Sentinel value: This MUST be zero
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardown";
|
static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardown";
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,9 @@ nsLoadGroup::nsLoadGroup(nsISupports* outer)
|
||||||
, mStatus(NS_OK)
|
, mStatus(NS_OK)
|
||||||
, mPriority(PRIORITY_NORMAL)
|
, mPriority(PRIORITY_NORMAL)
|
||||||
, mIsCanceling(false)
|
, mIsCanceling(false)
|
||||||
|
, mDefaultLoadIsTimed(false)
|
||||||
|
, mTimedRequests(0)
|
||||||
|
, mCachedRequests(0)
|
||||||
, mTimedNonCachedRequestsUntilOnEndPageLoad(0)
|
, mTimedNonCachedRequestsUntilOnEndPageLoad(0)
|
||||||
{
|
{
|
||||||
NS_INIT_AGGREGATED(outer);
|
NS_INIT_AGGREGATED(outer);
|
||||||
|
|
@ -427,6 +430,12 @@ nsLoadGroup::SetDefaultLoadRequest(nsIRequest *aRequest)
|
||||||
// in particular, nsIChannel::LOAD_DOCUMENT_URI...
|
// in particular, nsIChannel::LOAD_DOCUMENT_URI...
|
||||||
//
|
//
|
||||||
mLoadFlags &= nsIRequest::LOAD_REQUESTMASK;
|
mLoadFlags &= nsIRequest::LOAD_REQUESTMASK;
|
||||||
|
|
||||||
|
nsCOMPtr<nsITimedChannel> timedChannel = do_QueryInterface(aRequest);
|
||||||
|
mDefaultLoadIsTimed = timedChannel != nullptr;
|
||||||
|
if (mDefaultLoadIsTimed) {
|
||||||
|
timedChannel->SetTimingEnabled(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Else, do not change the group's load flags (see bug 95981)
|
// Else, do not change the group's load flags (see bug 95981)
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
@ -481,6 +490,10 @@ nsLoadGroup::AddRequest(nsIRequest *request, nsISupports* ctxt)
|
||||||
if (mPriority != 0)
|
if (mPriority != 0)
|
||||||
RescheduleRequest(request, mPriority);
|
RescheduleRequest(request, mPriority);
|
||||||
|
|
||||||
|
nsCOMPtr<nsITimedChannel> timedChannel = do_QueryInterface(request);
|
||||||
|
if (timedChannel)
|
||||||
|
timedChannel->SetTimingEnabled(true);
|
||||||
|
|
||||||
if (!(flags & nsIRequest::LOAD_BACKGROUND)) {
|
if (!(flags & nsIRequest::LOAD_BACKGROUND)) {
|
||||||
// Update the count of foreground URIs..
|
// Update the count of foreground URIs..
|
||||||
mForegroundCount += 1;
|
mForegroundCount += 1;
|
||||||
|
|
|
||||||
|
|
@ -82,6 +82,10 @@ protected:
|
||||||
int32_t mPriority;
|
int32_t mPriority;
|
||||||
bool mIsCanceling;
|
bool mIsCanceling;
|
||||||
|
|
||||||
|
bool mDefaultLoadIsTimed;
|
||||||
|
uint32_t mTimedRequests;
|
||||||
|
uint32_t mCachedRequests;
|
||||||
|
|
||||||
/* For nsPILoadGroupInternal */
|
/* For nsPILoadGroupInternal */
|
||||||
uint32_t mTimedNonCachedRequestsUntilOnEndPageLoad;
|
uint32_t mTimedNonCachedRequestsUntilOnEndPageLoad;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -125,6 +125,7 @@ nsSocketTransportService::nsSocketTransportService()
|
||||||
, mServingPendingQueue(false)
|
, mServingPendingQueue(false)
|
||||||
, mMaxTimePerPollIter(100)
|
, mMaxTimePerPollIter(100)
|
||||||
, mMaxTimeForPrClosePref(PR_SecondsToInterval(5))
|
, mMaxTimeForPrClosePref(PR_SecondsToInterval(5))
|
||||||
|
, mSleepPhase(false)
|
||||||
, mProbedMaxCount(false)
|
, mProbedMaxCount(false)
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
, mPolling(false)
|
, mPolling(false)
|
||||||
|
|
@ -566,6 +567,8 @@ nsSocketTransportService::Init()
|
||||||
if (obsSvc) {
|
if (obsSvc) {
|
||||||
obsSvc->AddObserver(this, "profile-initial-state", false);
|
obsSvc->AddObserver(this, "profile-initial-state", false);
|
||||||
obsSvc->AddObserver(this, "last-pb-context-exited", false);
|
obsSvc->AddObserver(this, "last-pb-context-exited", false);
|
||||||
|
obsSvc->AddObserver(this, NS_WIDGET_SLEEP_OBSERVER_TOPIC, true);
|
||||||
|
obsSvc->AddObserver(this, NS_WIDGET_WAKE_OBSERVER_TOPIC, true);
|
||||||
obsSvc->AddObserver(this, "xpcom-shutdown-threads", false);
|
obsSvc->AddObserver(this, "xpcom-shutdown-threads", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -632,9 +635,16 @@ nsSocketTransportService::ShutdownThread()
|
||||||
if (obsSvc) {
|
if (obsSvc) {
|
||||||
obsSvc->RemoveObserver(this, "profile-initial-state");
|
obsSvc->RemoveObserver(this, "profile-initial-state");
|
||||||
obsSvc->RemoveObserver(this, "last-pb-context-exited");
|
obsSvc->RemoveObserver(this, "last-pb-context-exited");
|
||||||
|
obsSvc->RemoveObserver(this, NS_WIDGET_SLEEP_OBSERVER_TOPIC);
|
||||||
|
obsSvc->RemoveObserver(this, NS_WIDGET_WAKE_OBSERVER_TOPIC);
|
||||||
obsSvc->RemoveObserver(this, "xpcom-shutdown-threads");
|
obsSvc->RemoveObserver(this, "xpcom-shutdown-threads");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mAfterWakeUpTimer) {
|
||||||
|
mAfterWakeUpTimer->Cancel();
|
||||||
|
mAfterWakeUpTimer = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
NetworkActivityMonitor::Shutdown();
|
NetworkActivityMonitor::Shutdown();
|
||||||
|
|
||||||
mInitialized = false;
|
mInitialized = false;
|
||||||
|
|
@ -1237,6 +1247,10 @@ nsSocketTransportService::Observe(nsISupports *subject,
|
||||||
|
|
||||||
if (!strcmp(topic, NS_TIMER_CALLBACK_TOPIC)) {
|
if (!strcmp(topic, NS_TIMER_CALLBACK_TOPIC)) {
|
||||||
nsCOMPtr<nsITimer> timer = do_QueryInterface(subject);
|
nsCOMPtr<nsITimer> timer = do_QueryInterface(subject);
|
||||||
|
if (timer == mAfterWakeUpTimer) {
|
||||||
|
mAfterWakeUpTimer = nullptr;
|
||||||
|
mSleepPhase = false;
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
if (timer == mPollRepairTimer) {
|
if (timer == mPollRepairTimer) {
|
||||||
|
|
@ -1244,6 +1258,19 @@ nsSocketTransportService::Observe(nsISupports *subject,
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
} else if (!strcmp(topic, NS_WIDGET_SLEEP_OBSERVER_TOPIC)) {
|
||||||
|
mSleepPhase = true;
|
||||||
|
if (mAfterWakeUpTimer) {
|
||||||
|
mAfterWakeUpTimer->Cancel();
|
||||||
|
mAfterWakeUpTimer = nullptr;
|
||||||
|
}
|
||||||
|
} else if (!strcmp(topic, NS_WIDGET_WAKE_OBSERVER_TOPIC)) {
|
||||||
|
if (mSleepPhase && !mAfterWakeUpTimer) {
|
||||||
|
mAfterWakeUpTimer = do_CreateInstance("@mozilla.org/timer;1");
|
||||||
|
if (mAfterWakeUpTimer) {
|
||||||
|
mAfterWakeUpTimer->Init(this, 2000, nsITimer::TYPE_ONE_SHOT);
|
||||||
|
}
|
||||||
|
}
|
||||||
} else if (!strcmp(topic, "xpcom-shutdown-threads")) {
|
} else if (!strcmp(topic, "xpcom-shutdown-threads")) {
|
||||||
ShutdownThread();
|
ShutdownThread();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -258,6 +258,9 @@ private:
|
||||||
Atomic<int32_t, Relaxed> mMaxTimePerPollIter;
|
Atomic<int32_t, Relaxed> mMaxTimePerPollIter;
|
||||||
Atomic<PRIntervalTime, Relaxed> mMaxTimeForPrClosePref;
|
Atomic<PRIntervalTime, Relaxed> mMaxTimeForPrClosePref;
|
||||||
|
|
||||||
|
Atomic<bool, Relaxed> mSleepPhase;
|
||||||
|
nsCOMPtr<nsITimer> mAfterWakeUpTimer;
|
||||||
|
|
||||||
void OnKeepaliveEnabledPrefChange();
|
void OnKeepaliveEnabledPrefChange();
|
||||||
void NotifyKeepaliveEnabledPrefChange(SocketContext *sock);
|
void NotifyKeepaliveEnabledPrefChange(SocketContext *sock);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
[table-item-flex-percentage-width.html]
|
||||||
|
expected: FAIL
|
||||||
|
bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1674268
|
||||||
|
|
@ -0,0 +1,140 @@
|
||||||
|
<!doctype html>
|
||||||
|
<title>Reference: display:table flex items with flex-shrink/flex-grow/flex-basis</title>
|
||||||
|
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1673006">
|
||||||
|
<link rel="stylesheet" href="/fonts/ahem.css">
|
||||||
|
<style>
|
||||||
|
html,body {
|
||||||
|
color:black; background-color:white; font:20px/1 Ahem; padding:0; margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
width: 180px;
|
||||||
|
border: 1px solid blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container > * {
|
||||||
|
background-color: cyan;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.test1 > * {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.test2 > * {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.test3 > * {
|
||||||
|
flex-shrink: 0.5;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.test4 > * {
|
||||||
|
flex-grow: 0.1;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.test5 > * {
|
||||||
|
flex-shrink: 0.2;
|
||||||
|
flex-grow: 0.5;
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
.base > * {
|
||||||
|
flex-basis: 100px;
|
||||||
|
}
|
||||||
|
.large-base {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
.large-base > * {
|
||||||
|
flex-basis: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="container test1">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test2">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test3">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test4">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test5">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test1 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test2 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test3 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test4 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test5 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test1 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test2 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test3 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test4 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test5 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,144 @@
|
||||||
|
<!doctype html>
|
||||||
|
<title>Flexbox Test: display:table flex items with flex-shrink/flex-grow/flex-basis</title>
|
||||||
|
<link rel="author" title="Mats Palmgren" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1673006">
|
||||||
|
<link rel="help" href="https://drafts.csswg.org/css-flexbox/#flex-property">
|
||||||
|
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1673006">
|
||||||
|
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1454330">
|
||||||
|
<link rel="match" href="table-item-flex-percentage-width-ref.html">
|
||||||
|
<link rel="stylesheet" href="/fonts/ahem.css">
|
||||||
|
<style>
|
||||||
|
html,body {
|
||||||
|
color:black; background-color:white; font:20px/1 Ahem; padding:0; margin:0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
width: 180px;
|
||||||
|
border: 1px solid blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container > * {
|
||||||
|
background-color: cyan;
|
||||||
|
display: table;
|
||||||
|
}
|
||||||
|
.test1 > * {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.test2 > * {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.test3 > * {
|
||||||
|
flex-shrink: 0.5;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.test4 > * {
|
||||||
|
flex-grow: 0.1;
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
.test5 > * {
|
||||||
|
flex-shrink: 0.2;
|
||||||
|
flex-grow: 0.5;
|
||||||
|
width: 10%;
|
||||||
|
}
|
||||||
|
.base > * {
|
||||||
|
flex-basis: 100px;
|
||||||
|
}
|
||||||
|
.large-base {
|
||||||
|
width: 100px;
|
||||||
|
}
|
||||||
|
.large-base > * {
|
||||||
|
flex-basis: 200px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="container test1">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test2">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test3">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test4">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test5">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test1 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test2 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test3 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test4 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test5 base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test1 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test2 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test3 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test4 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="container test5 large-base">
|
||||||
|
<div>1</div>
|
||||||
|
<div>2</div>
|
||||||
|
<div>3</div>
|
||||||
|
</div>
|
||||||
|
|
@ -13,6 +13,7 @@ Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
||||||
|
|
||||||
var params;
|
var params;
|
||||||
var cookieBundle;
|
var cookieBundle;
|
||||||
|
var gDateService = null;
|
||||||
|
|
||||||
var showDetails = "";
|
var showDetails = "";
|
||||||
var hideDetails = "";
|
var hideDetails = "";
|
||||||
|
|
@ -38,6 +39,14 @@ function onload()
|
||||||
document.getElementById("cancel").setAttribute("icon", "cancel");
|
document.getElementById("cancel").setAttribute("icon", "cancel");
|
||||||
document.getElementById("disclosureButton").setAttribute("icon", "properties");
|
document.getElementById("disclosureButton").setAttribute("icon", "properties");
|
||||||
|
|
||||||
|
// Initialize the date formatter
|
||||||
|
if (!gDateService) {
|
||||||
|
const nsScriptableDateFormat_CONTRACTID = "@mozilla.org/intl/scriptabledateformat;1";
|
||||||
|
const nsIScriptableDateFormat = Components.interfaces.nsIScriptableDateFormat;
|
||||||
|
gDateService = Components.classes[nsScriptableDateFormat_CONTRACTID]
|
||||||
|
.getService(nsIScriptableDateFormat);
|
||||||
|
}
|
||||||
|
|
||||||
cookieBundle = document.getElementById("cookieBundle");
|
cookieBundle = document.getElementById("cookieBundle");
|
||||||
|
|
||||||
// cache strings
|
// cache strings
|
||||||
|
|
@ -174,12 +183,21 @@ function cookieDeny()
|
||||||
function GetExpiresString(secondsUntilExpires) {
|
function GetExpiresString(secondsUntilExpires) {
|
||||||
if (secondsUntilExpires) {
|
if (secondsUntilExpires) {
|
||||||
var date = new Date(1000*secondsUntilExpires);
|
var date = new Date(1000*secondsUntilExpires);
|
||||||
const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
|
||||||
.getService(Components.interfaces.nsIXULChromeRegistry)
|
// if a server manages to set a really long-lived cookie, the dateservice
|
||||||
.getSelectedLocale("global", true);
|
// can't cope with it properly, so we'll return a descriptive string instead.
|
||||||
const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
|
var expiry = "";
|
||||||
hour: 'numeric', minute: 'numeric', second: 'numeric' };
|
try {
|
||||||
return date.toLocaleString(locale, dtOptions);
|
expiry = gDateService.FormatDateTime("", gDateService.dateFormatLong,
|
||||||
|
gDateService.timeFormatSeconds,
|
||||||
|
date.getFullYear(), date.getMonth()+1,
|
||||||
|
date.getDate(), date.getHours(),
|
||||||
|
date.getMinutes(), date.getSeconds());
|
||||||
|
} catch (ex) {
|
||||||
|
// Expiry duration was out of range for the date formatter, meaning a silly long time.
|
||||||
|
expiry = cookieBundle.getString("expireInAVeryLongTime");
|
||||||
|
}
|
||||||
|
return expiry;
|
||||||
}
|
}
|
||||||
return cookieBundle.getString("expireAtEndOfSession");
|
return cookieBundle.getString("expireAtEndOfSession");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -717,6 +717,22 @@ this.DownloadIntegration = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef XP_WIN
|
||||||
|
// When a file has no extension, and there's an executable file with the
|
||||||
|
// same name in the same folder, the Windows shell can get confused.
|
||||||
|
// For this reason, we show the file in the containing folder instead of
|
||||||
|
// trying to open it.
|
||||||
|
// We also don't trust mimeinfo; it could be a type we can forward to a
|
||||||
|
// system handler, but it could also be an executable type, and we
|
||||||
|
// don't have an exhaustive list with all of them.
|
||||||
|
if (!fileExtension) {
|
||||||
|
// We can't check for the existence of a same-name file with every
|
||||||
|
// possible executable extension, so this is a catch-all.
|
||||||
|
this.showContainingDirectory(aDownload.target.path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// No custom application chosen, let's launch the file with the default
|
// No custom application chosen, let's launch the file with the default
|
||||||
// handler. First, let's try to launch it through the MIME service.
|
// handler. First, let's try to launch it through the MIME service.
|
||||||
if (mimeInfo) {
|
if (mimeInfo) {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,8 @@ domainColon=Domain:
|
||||||
forSecureOnly=Encrypted connections only
|
forSecureOnly=Encrypted connections only
|
||||||
forAnyConnection=Any type of connection
|
forAnyConnection=Any type of connection
|
||||||
expireAtEndOfSession=At end of session
|
expireAtEndOfSession=At end of session
|
||||||
|
# LOCALIZATION NOTE (expireInAVeryLongTime) This string is used if a cookie won't expire for a literal life age and then some.
|
||||||
|
expireInAVeryLongTime=Not in your lifetime
|
||||||
|
|
||||||
showDetails=Show Details
|
showDetails=Show Details
|
||||||
hideDetails=Hide Details
|
hideDetails=Hide Details
|
||||||
|
|
|
||||||
|
|
@ -58,13 +58,18 @@ var gUpdateHistory = {
|
||||||
* @returns A human readable date string
|
* @returns A human readable date string
|
||||||
*/
|
*/
|
||||||
_formatDate: function(seconds) {
|
_formatDate: function(seconds) {
|
||||||
|
var sdf =
|
||||||
|
Components.classes["@mozilla.org/intl/scriptabledateformat;1"].
|
||||||
|
getService(Components.interfaces.nsIScriptableDateFormat);
|
||||||
var date = new Date(seconds);
|
var date = new Date(seconds);
|
||||||
const locale = Components.classes["@mozilla.org/chrome/chrome-registry;1"]
|
return sdf.FormatDateTime("", sdf.dateFormatLong,
|
||||||
.getService(Components.interfaces.nsIXULChromeRegistry)
|
sdf.timeFormatSeconds,
|
||||||
.getSelectedLocale("global", true);
|
date.getFullYear(),
|
||||||
const dtOptions = { year: 'numeric', month: 'long', day: 'numeric',
|
date.getMonth() + 1,
|
||||||
hour: 'numeric', minute: 'numeric', second: 'numeric' };
|
date.getDate(),
|
||||||
return date.toLocaleString(locale, dtOptions);
|
date.getHours(),
|
||||||
|
date.getMinutes(),
|
||||||
|
date.getSeconds());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue