mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-23 07:37:29 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
897bcc3b20
32 changed files with 251 additions and 154 deletions
|
|
@ -624,7 +624,6 @@ file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
}
|
}
|
||||||
// Augment the search action details object.
|
// Augment the search action details object.
|
||||||
let details = searchActionDetails || {};
|
let details = searchActionDetails || {};
|
||||||
details.isOneOff = isOneOff;
|
|
||||||
details.type = eventType;
|
details.type = eventType;
|
||||||
|
|
||||||
let submission = engine.getSubmission(query, null, "keyword");
|
let submission = engine.getSubmission(query, null, "keyword");
|
||||||
|
|
|
||||||
|
|
@ -1940,8 +1940,6 @@
|
||||||
aOpenUILinkParams &&
|
aOpenUILinkParams &&
|
||||||
aOpenUILinkParams.inBackground;
|
aOpenUILinkParams.inBackground;
|
||||||
let where = tabBackground ? "tab-background" : aOpenUILinkWhere;
|
let where = tabBackground ? "tab-background" : aOpenUILinkWhere;
|
||||||
BrowserSearch.recordOneoffSearchInTelemetry(engine, source, type,
|
|
||||||
where);
|
|
||||||
return true;
|
return true;
|
||||||
]]></body>
|
]]></body>
|
||||||
</method>
|
</method>
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
#include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL
|
#include "nsXPCOMPrivate.h" // for MAXPATHLEN and XPCOM_DLL
|
||||||
|
|
||||||
|
#include "mozilla/StartupTimeline.h"
|
||||||
#include "mozilla/Sprintf.h"
|
#include "mozilla/Sprintf.h"
|
||||||
#include "mozilla/WindowsDllBlocklist.h"
|
#include "mozilla/WindowsDllBlocklist.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ var StarUI = {
|
||||||
get _blockedCommands() {
|
get _blockedCommands() {
|
||||||
delete this._blockedCommands;
|
delete this._blockedCommands;
|
||||||
return this._blockedCommands =
|
return this._blockedCommands =
|
||||||
["cmd_close", "cmd_closeWindow"].map(function(id) this._element(id), this);
|
["cmd_close", "cmd_closeWindow"].map(id => this._element(id));
|
||||||
},
|
},
|
||||||
|
|
||||||
_blockCommands: function() {
|
_blockCommands: function() {
|
||||||
|
|
@ -1258,7 +1258,7 @@ var BookmarkingUI = {
|
||||||
// calls back. For such an edge case, retain all unique entries from both
|
// calls back. For such an edge case, retain all unique entries from both
|
||||||
// arrays.
|
// arrays.
|
||||||
this._itemIds = this._itemIds.filter(
|
this._itemIds = this._itemIds.filter(
|
||||||
function(id) aItemIds.indexOf(id) == -1
|
id => aItemIds.indexOf(id) == -1
|
||||||
).concat(aItemIds);
|
).concat(aItemIds);
|
||||||
|
|
||||||
this._updateStar();
|
this._updateStar();
|
||||||
|
|
|
||||||
|
|
@ -220,7 +220,7 @@ var gSyncUI = {
|
||||||
|
|
||||||
// Commands
|
// Commands
|
||||||
doSync: function() {
|
doSync: function() {
|
||||||
setTimeout(function() Weave.Service.errorHandler.syncAndReportErrors(), 0);
|
setTimeout(() => Weave.Service.errorHandler.syncAndReportErrors(), 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
handleToolbarButton: function() {
|
handleToolbarButton: function() {
|
||||||
|
|
|
||||||
|
|
@ -1472,7 +1472,7 @@ var gBrowserInit = {
|
||||||
let itemArray = itemBranch.getChildList("");
|
let itemArray = itemBranch.getChildList("");
|
||||||
|
|
||||||
// See if any privacy.item prefs are set
|
// See if any privacy.item prefs are set
|
||||||
let doMigrate = itemArray.some(function(name) itemBranch.prefHasUserValue(name));
|
let doMigrate = itemArray.some(name => itemBranch.prefHasUserValue(name));
|
||||||
// Or if sanitizeOnShutdown is set
|
// Or if sanitizeOnShutdown is set
|
||||||
if (!doMigrate) {
|
if (!doMigrate) {
|
||||||
doMigrate = gPrefService.getBoolPref("privacy.sanitize.sanitizeOnShutdown");
|
doMigrate = gPrefService.getBoolPref("privacy.sanitize.sanitizeOnShutdown");
|
||||||
|
|
@ -2632,12 +2632,14 @@ var PrintPreviewListener = {
|
||||||
this._chromeState.globalNotificationsOpen = !globalNotificationBox.notificationsHidden;
|
this._chromeState.globalNotificationsOpen = !globalNotificationBox.notificationsHidden;
|
||||||
globalNotificationBox.notificationsHidden = true;
|
globalNotificationBox.notificationsHidden = true;
|
||||||
|
|
||||||
|
#ifdef MOZ_SERVICES_SYNC
|
||||||
this._chromeState.syncNotificationsOpen = false;
|
this._chromeState.syncNotificationsOpen = false;
|
||||||
var syncNotifications = document.getElementById("sync-notifications");
|
var syncNotifications = document.getElementById("sync-notifications");
|
||||||
if (syncNotifications) {
|
if (syncNotifications) {
|
||||||
this._chromeState.syncNotificationsOpen = !syncNotifications.notificationsHidden;
|
this._chromeState.syncNotificationsOpen = !syncNotifications.notificationsHidden;
|
||||||
syncNotifications.notificationsHidden = true;
|
syncNotifications.notificationsHidden = true;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
},
|
},
|
||||||
|
|
||||||
_showChrome: function() {
|
_showChrome: function() {
|
||||||
|
|
@ -2658,9 +2660,11 @@ var PrintPreviewListener = {
|
||||||
document.getElementById("global-notificationbox").notificationsHidden = false;
|
document.getElementById("global-notificationbox").notificationsHidden = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef MOZ_SERVICES_SYNC
|
||||||
if (this._chromeState.syncNotificationsOpen) {
|
if (this._chromeState.syncNotificationsOpen) {
|
||||||
document.getElementById("sync-notifications").notificationsHidden = false;
|
document.getElementById("sync-notifications").notificationsHidden = false;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2951,7 +2955,7 @@ const BrowserSearch = {
|
||||||
|
|
||||||
// Check to see whether we've already added an engine with this title
|
// Check to see whether we've already added an engine with this title
|
||||||
if (browser.engines) {
|
if (browser.engines) {
|
||||||
if (browser.engines.some(function(e) e.title == engine.title)) {
|
if (browser.engines.some(e => e.title == engine.title)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4416,7 +4420,7 @@ nsBrowserAccess.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
isTabContentWindow: function(aWindow) {
|
isTabContentWindow: function(aWindow) {
|
||||||
return gBrowser.browsers.some(function(browser) browser.contentWindow == aWindow);
|
return gBrowser.browsers.some(browser => browser.contentWindow == aWindow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4660,8 +4664,8 @@ var TabsInTitlebar = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_update: function() {
|
_update: function() {
|
||||||
function $(id) document.getElementById(id);
|
let $ = id => document.getElementById(id);
|
||||||
function rect(ele) ele.getBoundingClientRect();
|
let rect = ele => ele.getBoundingClientRect();
|
||||||
|
|
||||||
if (!this._initialized || window.fullScreen) {
|
if (!this._initialized || window.fullScreen) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
<getter><![CDATA[
|
<getter><![CDATA[
|
||||||
if (!this._visibleTabs)
|
if (!this._visibleTabs)
|
||||||
this._visibleTabs = Array.filter(this.tabs,
|
this._visibleTabs = Array.filter(this.tabs,
|
||||||
function (tab) !tab.hidden && !tab.closing);
|
tab => !tab.hidden && !tab.closing);
|
||||||
return this._visibleTabs;
|
return this._visibleTabs;
|
||||||
]]></getter>
|
]]></getter>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -2501,7 +2501,7 @@
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.mProgressListeners =
|
this.mProgressListeners =
|
||||||
this.mProgressListeners.filter(function (l) l != aListener);
|
this.mProgressListeners.filter(l => l != aListener);
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
@ -2518,7 +2518,7 @@
|
||||||
<body>
|
<body>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
this.mTabsProgressListeners =
|
this.mTabsProgressListeners =
|
||||||
this.mTabsProgressListeners.filter(function (l) l != aListener);
|
this.mTabsProgressListeners.filter(l => l != aListener);
|
||||||
]]>
|
]]>
|
||||||
</body>
|
</body>
|
||||||
</method>
|
</method>
|
||||||
|
|
@ -2635,7 +2635,7 @@
|
||||||
<getter>
|
<getter>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
return this._browsers ||
|
return this._browsers ||
|
||||||
(this._browsers = Array.map(this.tabs, function (tab) tab.linkedBrowser));
|
(this._browsers = Array.map(this.tabs, tab => tab.linkedBrowser));
|
||||||
]]>
|
]]>
|
||||||
</getter>
|
</getter>
|
||||||
</property>
|
</property>
|
||||||
|
|
@ -4593,7 +4593,9 @@
|
||||||
// positioned relative to the corner of the new window created upon
|
// positioned relative to the corner of the new window created upon
|
||||||
// dragend such that the mouse appears to have the same position
|
// dragend such that the mouse appears to have the same position
|
||||||
// relative to the corner of the dragged tab.
|
// relative to the corner of the dragged tab.
|
||||||
function clientX(ele) ele.getBoundingClientRect().left;
|
function clientX(ele) {
|
||||||
|
return ele.getBoundingClientRect().left;
|
||||||
|
}
|
||||||
let tabOffsetX = clientX(tab) - clientX(this);
|
let tabOffsetX = clientX(tab) - clientX(this);
|
||||||
tab._dragData = {
|
tab._dragData = {
|
||||||
offsetX: event.screenX - window.screenX - tabOffsetX,
|
offsetX: event.screenX - window.screenX - tabOffsetX,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ LOCAL_INCLUDES += [
|
||||||
|
|
||||||
if CONFIG['OS_ARCH'] == 'WINNT':
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
||||||
OS_LIBS += [
|
OS_LIBS += [
|
||||||
'esent',
|
|
||||||
'netapi32',
|
'netapi32',
|
||||||
'ole32',
|
'ole32',
|
||||||
'shell32',
|
'shell32',
|
||||||
|
|
@ -25,8 +24,9 @@ if CONFIG['OS_ARCH'] == 'WINNT':
|
||||||
'version',
|
'version',
|
||||||
]
|
]
|
||||||
DELAYLOAD_DLLS += [
|
DELAYLOAD_DLLS += [
|
||||||
'esent.dll',
|
|
||||||
'netapi32.dll',
|
'netapi32.dll',
|
||||||
|
'advapi32.dll',
|
||||||
|
'ole32.dll',
|
||||||
]
|
]
|
||||||
|
|
||||||
# GTK: Need to link with glib for GNOME shell service
|
# GTK: Need to link with glib for GNOME shell service
|
||||||
|
|
|
||||||
|
|
@ -34,33 +34,33 @@ DistributionCustomizer.prototype = {
|
||||||
let ini = Cc["@mozilla.org/xpcom/ini-parser-factory;1"]
|
let ini = Cc["@mozilla.org/xpcom/ini-parser-factory;1"]
|
||||||
.getService(Ci.nsIINIParserFactory)
|
.getService(Ci.nsIINIParserFactory)
|
||||||
.createINIParser(this._iniFile);
|
.createINIParser(this._iniFile);
|
||||||
this.__defineGetter__("_ini", function() ini);
|
this.__defineGetter__("_ini", () => ini);
|
||||||
return this._ini;
|
return this._ini;
|
||||||
},
|
},
|
||||||
|
|
||||||
get _locale() {
|
get _locale() {
|
||||||
let locale = this._prefs.getCharPref("general.useragent.locale", "en-US");
|
let locale = this._prefs.getCharPref("general.useragent.locale", "en-US");
|
||||||
this.__defineGetter__("_locale", function() locale);
|
this.__defineGetter__("_locale", () => locale);
|
||||||
return this._locale;
|
return this._locale;
|
||||||
},
|
},
|
||||||
|
|
||||||
get _prefSvc() {
|
get _prefSvc() {
|
||||||
let svc = Cc["@mozilla.org/preferences-service;1"]
|
let svc = Cc["@mozilla.org/preferences-service;1"]
|
||||||
.getService(Ci.nsIPrefService);
|
.getService(Ci.nsIPrefService);
|
||||||
this.__defineGetter__("_prefSvc", function() svc);
|
this.__defineGetter__("_prefSvc", () => svc);
|
||||||
return this._prefSvc;
|
return this._prefSvc;
|
||||||
},
|
},
|
||||||
|
|
||||||
get _prefs() {
|
get _prefs() {
|
||||||
let branch = this._prefSvc.getBranch(null);
|
let branch = this._prefSvc.getBranch(null);
|
||||||
this.__defineGetter__("_prefs", function() branch);
|
this.__defineGetter__("_prefs", () => branch);
|
||||||
return this._prefs;
|
return this._prefs;
|
||||||
},
|
},
|
||||||
|
|
||||||
get _ioSvc() {
|
get _ioSvc() {
|
||||||
let svc = Cc["@mozilla.org/network/io-service;1"]
|
let svc = Cc["@mozilla.org/network/io-service;1"]
|
||||||
.getService(Ci.nsIIOService);
|
.getService(Ci.nsIIOService);
|
||||||
this.__defineGetter__("_ioSvc", function() svc);
|
this.__defineGetter__("_ioSvc", () => svc);
|
||||||
return this._ioSvc;
|
return this._ioSvc;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -678,7 +678,9 @@ DownloadsDataCtor.prototype = {
|
||||||
* Iterator for all the available Download objects. This is empty until the
|
* Iterator for all the available Download objects. This is empty until the
|
||||||
* data has been loaded using the JavaScript API for downloads.
|
* data has been loaded using the JavaScript API for downloads.
|
||||||
*/
|
*/
|
||||||
get downloads() this.oldDownloadStates.keys(),
|
get downloads() {
|
||||||
|
return this.oldDownloadStates.keys();
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* True if there are finished downloads that can be removed from the list.
|
* True if there are finished downloads that can be removed from the list.
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,9 @@ this.DownloadsViewUI.DownloadElementShell.prototype = {
|
||||||
* returned by a single property because they are computed together. The
|
* returned by a single property because they are computed together. The
|
||||||
* result may be overridden by derived objects.
|
* result may be overridden by derived objects.
|
||||||
*/
|
*/
|
||||||
get statusTextAndTip() this.rawStatusTextAndTip,
|
get statusTextAndTip() {
|
||||||
|
return this.rawStatusTextAndTip;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Derived objects may call this to get the status text.
|
* Derived objects may call this to get the status text.
|
||||||
|
|
|
||||||
|
|
@ -220,16 +220,22 @@ HistoryDownloadElementShell.prototype = {
|
||||||
this._updateUI();
|
this._updateUI();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
get active() !!this._active,
|
get active() {
|
||||||
|
return !!this._active;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides the base getter to return the Download or HistoryDownload object
|
* Overrides the base getter to return the Download or HistoryDownload object
|
||||||
* for displaying information and executing commands in the user interface.
|
* for displaying information and executing commands in the user interface.
|
||||||
*/
|
*/
|
||||||
get download() this._sessionDownload || this._historyDownload,
|
get download() {
|
||||||
|
return this._sessionDownload || this._historyDownload;
|
||||||
|
},
|
||||||
|
|
||||||
_sessionDownload: null,
|
_sessionDownload: null,
|
||||||
get sessionDownload() this._sessionDownload,
|
get sessionDownload() {
|
||||||
|
return this._sessionDownload;
|
||||||
|
},
|
||||||
set sessionDownload(aValue) {
|
set sessionDownload(aValue) {
|
||||||
if (this._sessionDownload != aValue) {
|
if (this._sessionDownload != aValue) {
|
||||||
if (!aValue && !this._historyDownload) {
|
if (!aValue && !this._historyDownload) {
|
||||||
|
|
@ -245,7 +251,9 @@ HistoryDownloadElementShell.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_historyDownload: null,
|
_historyDownload: null,
|
||||||
get historyDownload() this._historyDownload,
|
get historyDownload() {
|
||||||
|
return this._historyDownload;
|
||||||
|
},
|
||||||
set historyDownload(aValue) {
|
set historyDownload(aValue) {
|
||||||
if (this._historyDownload != aValue) {
|
if (this._historyDownload != aValue) {
|
||||||
if (!aValue && !this._sessionDownload) {
|
if (!aValue && !this._sessionDownload) {
|
||||||
|
|
@ -525,9 +533,14 @@ function DownloadsPlacesView(aRichListBox, aActive = true) {
|
||||||
}
|
}
|
||||||
|
|
||||||
DownloadsPlacesView.prototype = {
|
DownloadsPlacesView.prototype = {
|
||||||
get associatedElement() this._richlistbox,
|
get associatedElement() {
|
||||||
|
return this._richlistbox;
|
||||||
|
},
|
||||||
|
|
||||||
get active() this._active,
|
|
||||||
|
get active() {
|
||||||
|
return this._active;
|
||||||
|
},
|
||||||
set active(val) {
|
set active(val) {
|
||||||
this._active = val;
|
this._active = val;
|
||||||
if (this._active)
|
if (this._active)
|
||||||
|
|
@ -902,7 +915,9 @@ DownloadsPlacesView.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_place: "",
|
_place: "",
|
||||||
get place() this._place,
|
get place() {
|
||||||
|
return this._place;
|
||||||
|
},
|
||||||
set place(val) {
|
set place(val) {
|
||||||
// Don't reload everything if we don't have to.
|
// Don't reload everything if we don't have to.
|
||||||
if (this._place == val) {
|
if (this._place == val) {
|
||||||
|
|
@ -926,7 +941,9 @@ DownloadsPlacesView.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_result: null,
|
_result: null,
|
||||||
get result() this._result,
|
get result() {
|
||||||
|
return this._result;
|
||||||
|
},
|
||||||
set result(val) {
|
set result(val) {
|
||||||
if (this._result == val)
|
if (this._result == val)
|
||||||
return val;
|
return val;
|
||||||
|
|
@ -961,7 +978,9 @@ DownloadsPlacesView.prototype = {
|
||||||
return selectedNodes.length == 1 ? selectedNodes[0] : null;
|
return selectedNodes.length == 1 ? selectedNodes[0] : null;
|
||||||
},
|
},
|
||||||
|
|
||||||
get hasSelection() this.selectedNodes.length > 0,
|
get hasSelection() {
|
||||||
|
return this.selectedNodes.length > 0;
|
||||||
|
},
|
||||||
|
|
||||||
containerStateChanged:
|
containerStateChanged:
|
||||||
function(aNode, aOldState, aNewState) {
|
function(aNode, aOldState, aNewState) {
|
||||||
|
|
@ -1058,9 +1077,13 @@ DownloadsPlacesView.prototype = {
|
||||||
nodeURIChanged: function() {},
|
nodeURIChanged: function() {},
|
||||||
batching: function() {},
|
batching: function() {},
|
||||||
|
|
||||||
get controller() this._richlistbox.controller,
|
get controller() {
|
||||||
|
return this._richlistbox.controller;
|
||||||
|
},
|
||||||
|
|
||||||
get searchTerm() this._searchTerm,
|
get searchTerm() {
|
||||||
|
return this._searchTerm;
|
||||||
|
},
|
||||||
set searchTerm(aValue) {
|
set searchTerm(aValue) {
|
||||||
if (this._searchTerm != aValue) {
|
if (this._searchTerm != aValue) {
|
||||||
for (let element of this._richlistbox.childNodes) {
|
for (let element of this._richlistbox.childNodes) {
|
||||||
|
|
|
||||||
|
|
@ -97,22 +97,33 @@ const DownloadsPanel = {
|
||||||
_state: 0,
|
_state: 0,
|
||||||
|
|
||||||
/** The panel is not linked to downloads data yet. */
|
/** The panel is not linked to downloads data yet. */
|
||||||
get kStateUninitialized() 0,
|
get kStateUninitialized() {
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
/** This object is linked to data, but the panel is invisible. */
|
/** This object is linked to data, but the panel is invisible. */
|
||||||
get kStateHidden() 1,
|
get kStateHidden() {
|
||||||
|
return 1;
|
||||||
|
},
|
||||||
/** The panel will be shown as soon as possible. */
|
/** The panel will be shown as soon as possible. */
|
||||||
get kStateWaitingData() 2,
|
get kStateWaitingData() {
|
||||||
|
return 2;
|
||||||
|
},
|
||||||
/** The panel is almost shown - we're just waiting to get a handle on the
|
/** The panel is almost shown - we're just waiting to get a handle on the
|
||||||
anchor. */
|
anchor. */
|
||||||
get kStateWaitingAnchor() 3,
|
get kStateWaitingAnchor() {
|
||||||
|
return 3;
|
||||||
|
},
|
||||||
/** The panel is open. */
|
/** The panel is open. */
|
||||||
get kStateShown() 4,
|
get kStateShown() {
|
||||||
|
return 4;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Location of the panel overlay.
|
* Location of the panel overlay.
|
||||||
*/
|
*/
|
||||||
get kDownloadsOverlay()
|
get kDownloadsOverlay() {
|
||||||
"chrome://browser/content/downloads/downloadsOverlay.xul",
|
return "chrome://browser/content/downloads/downloadsOverlay.xul";
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts loading the download data in background, without opening the panel.
|
* Starts loading the download data in background, without opening the panel.
|
||||||
|
|
@ -1388,7 +1399,9 @@ const DownloadsSummary = {
|
||||||
/**
|
/**
|
||||||
* Returns the active state of the downloads summary.
|
* Returns the active state of the downloads summary.
|
||||||
*/
|
*/
|
||||||
get active() this._active,
|
get active() {
|
||||||
|
return this._active;
|
||||||
|
},
|
||||||
|
|
||||||
_active: false,
|
_active: false,
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,9 @@ const DownloadsButton = {
|
||||||
/**
|
/**
|
||||||
* Location of the indicator overlay.
|
* Location of the indicator overlay.
|
||||||
*/
|
*/
|
||||||
get kIndicatorOverlay()
|
get kIndicatorOverlay() {
|
||||||
"chrome://browser/content/downloads/indicatorOverlay.xul",
|
return "chrome://browser/content/downloads/indicatorOverlay.xul";
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a reference to the downloads button position placeholder, or null
|
* Returns a reference to the downloads button position placeholder, or null
|
||||||
|
|
|
||||||
|
|
@ -18,34 +18,34 @@ var Utilities = {
|
||||||
get bookmarks() {
|
get bookmarks() {
|
||||||
let bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
|
let bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
|
||||||
getService(Ci.nsINavBookmarksService);
|
getService(Ci.nsINavBookmarksService);
|
||||||
this.__defineGetter__("bookmarks", function() bookmarks);
|
this.__defineGetter__("bookmarks", () => bookmarks);
|
||||||
return this.bookmarks;
|
return this.bookmarks;
|
||||||
},
|
},
|
||||||
|
|
||||||
get bookmarksObserver() {
|
get bookmarksObserver() {
|
||||||
let bookmarksObserver = new BookmarksObserver();
|
let bookmarksObserver = new BookmarksObserver();
|
||||||
this.__defineGetter__("bookmarksObserver", function() bookmarksObserver);
|
this.__defineGetter__("bookmarksObserver", () => bookmarksObserver);
|
||||||
return this.bookmarksObserver;
|
return this.bookmarksObserver;
|
||||||
},
|
},
|
||||||
|
|
||||||
get annotations() {
|
get annotations() {
|
||||||
let annotations = Cc["@mozilla.org/browser/annotation-service;1"].
|
let annotations = Cc["@mozilla.org/browser/annotation-service;1"].
|
||||||
getService(Ci.nsIAnnotationService);
|
getService(Ci.nsIAnnotationService);
|
||||||
this.__defineGetter__("annotations", function() annotations);
|
this.__defineGetter__("annotations", () => annotations);
|
||||||
return this.annotations;
|
return this.annotations;
|
||||||
},
|
},
|
||||||
|
|
||||||
get history() {
|
get history() {
|
||||||
let history = Cc["@mozilla.org/browser/nav-history-service;1"].
|
let history = Cc["@mozilla.org/browser/nav-history-service;1"].
|
||||||
getService(Ci.nsINavHistoryService);
|
getService(Ci.nsINavHistoryService);
|
||||||
this.__defineGetter__("history", function() history);
|
this.__defineGetter__("history", () => history);
|
||||||
return this.history;
|
return this.history;
|
||||||
},
|
},
|
||||||
|
|
||||||
get windowMediator() {
|
get windowMediator() {
|
||||||
let windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
|
let windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
|
||||||
getService(Ci.nsIWindowMediator);
|
getService(Ci.nsIWindowMediator);
|
||||||
this.__defineGetter__("windowMediator", function() windowMediator);
|
this.__defineGetter__("windowMediator", () => windowMediator);
|
||||||
return this.windowMediator;
|
return this.windowMediator;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -781,7 +781,7 @@ nsDefaultCommandLineHandler.prototype = {
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
var URLlist = urilist.filter(shouldLoadURI).map(function(u) u.spec);
|
var URLlist = urilist.filter(shouldLoadURI).map(u => u.spec);
|
||||||
if (URLlist.length) {
|
if (URLlist.length) {
|
||||||
openWindow(null, gBrowserContentHandler.chromeURL, "_blank",
|
openWindow(null, gBrowserContentHandler.chromeURL, "_blank",
|
||||||
"chrome,dialog=no,all" + gBrowserContentHandler.getFeatures(cmdLine),
|
"chrome,dialog=no,all" + gBrowserContentHandler.getFeatures(cmdLine),
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,14 @@ this.PlacesUIUtils = {
|
||||||
return bundle.GetStringFromName(key);
|
return bundle.GetStringFromName(key);
|
||||||
},
|
},
|
||||||
|
|
||||||
get _copyableAnnotations() [
|
get _copyableAnnotations() {
|
||||||
|
return [
|
||||||
this.DESCRIPTION_ANNO,
|
this.DESCRIPTION_ANNO,
|
||||||
this.LOAD_IN_SIDEBAR_ANNO,
|
this.LOAD_IN_SIDEBAR_ANNO,
|
||||||
PlacesUtils.POST_DATA_ANNO,
|
PlacesUtils.POST_DATA_ANNO,
|
||||||
PlacesUtils.READ_ONLY_ANNO,
|
PlacesUtils.READ_ONLY_ANNO,
|
||||||
],
|
];
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a transaction for copying a uri item (either a bookmark or a history
|
* Get a transaction for copying a uri item (either a bookmark or a history
|
||||||
|
|
@ -1219,71 +1221,71 @@ XPCOMUtils.defineLazyGetter(PlacesUIUtils, "ptm", function() {
|
||||||
PlacesUtils;
|
PlacesUtils;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
aggregateTransactions: function(aName, aTransactions)
|
aggregateTransactions: (aName, aTransactions) =>
|
||||||
new PlacesAggregatedTransaction(aName, aTransactions),
|
new PlacesAggregatedTransaction(aName, aTransactions),
|
||||||
|
|
||||||
createFolder: function(aName, aContainer, aIndex, aAnnotations,
|
createFolder: (aName, aContainer, aIndex, aAnnotations,
|
||||||
aChildItemsTransactions)
|
aChildItemsTransactions) =>
|
||||||
new PlacesCreateFolderTransaction(aName, aContainer, aIndex, aAnnotations,
|
new PlacesCreateFolderTransaction(aName, aContainer, aIndex, aAnnotations,
|
||||||
aChildItemsTransactions),
|
aChildItemsTransactions),
|
||||||
|
|
||||||
createItem: function(aURI, aContainer, aIndex, aTitle, aKeyword,
|
createItem: (aURI, aContainer, aIndex, aTitle, aKeyword,
|
||||||
aAnnotations, aChildTransactions)
|
aAnnotations, aChildTransactions) =>
|
||||||
new PlacesCreateBookmarkTransaction(aURI, aContainer, aIndex, aTitle,
|
new PlacesCreateBookmarkTransaction(aURI, aContainer, aIndex, aTitle,
|
||||||
aKeyword, aAnnotations,
|
aKeyword, aAnnotations,
|
||||||
aChildTransactions),
|
aChildTransactions),
|
||||||
|
|
||||||
createSeparator: function(aContainer, aIndex)
|
createSeparator: (aContainer, aIndex) =>
|
||||||
new PlacesCreateSeparatorTransaction(aContainer, aIndex),
|
new PlacesCreateSeparatorTransaction(aContainer, aIndex),
|
||||||
|
|
||||||
createLivemark: function(aFeedURI, aSiteURI, aName, aContainer, aIndex,
|
createLivemark: (aFeedURI, aSiteURI, aName, aContainer, aIndex,
|
||||||
aAnnotations)
|
aAnnotations) =>
|
||||||
new PlacesCreateLivemarkTransaction(aFeedURI, aSiteURI, aName, aContainer,
|
new PlacesCreateLivemarkTransaction(aFeedURI, aSiteURI, aName, aContainer,
|
||||||
aIndex, aAnnotations),
|
aIndex, aAnnotations),
|
||||||
|
|
||||||
moveItem: function(aItemId, aNewContainer, aNewIndex)
|
moveItem: (aItemId, aNewContainer, aNewIndex) =>
|
||||||
new PlacesMoveItemTransaction(aItemId, aNewContainer, aNewIndex),
|
new PlacesMoveItemTransaction(aItemId, aNewContainer, aNewIndex),
|
||||||
|
|
||||||
removeItem: function(aItemId)
|
removeItem: (aItemId) =>
|
||||||
new PlacesRemoveItemTransaction(aItemId),
|
new PlacesRemoveItemTransaction(aItemId),
|
||||||
|
|
||||||
editItemTitle: function(aItemId, aNewTitle)
|
editItemTitle: (aItemId, aNewTitle) =>
|
||||||
new PlacesEditItemTitleTransaction(aItemId, aNewTitle),
|
new PlacesEditItemTitleTransaction(aItemId, aNewTitle),
|
||||||
|
|
||||||
editBookmarkURI: function(aItemId, aNewURI)
|
editBookmarkURI: (aItemId, aNewURI) =>
|
||||||
new PlacesEditBookmarkURITransaction(aItemId, aNewURI),
|
new PlacesEditBookmarkURITransaction(aItemId, aNewURI),
|
||||||
|
|
||||||
setItemAnnotation: function(aItemId, aAnnotationObject)
|
setItemAnnotation: (aItemId, aAnnotationObject) =>
|
||||||
new PlacesSetItemAnnotationTransaction(aItemId, aAnnotationObject),
|
new PlacesSetItemAnnotationTransaction(aItemId, aAnnotationObject),
|
||||||
|
|
||||||
setPageAnnotation: function(aURI, aAnnotationObject)
|
setPageAnnotation: (aURI, aAnnotationObject) =>
|
||||||
new PlacesSetPageAnnotationTransaction(aURI, aAnnotationObject),
|
new PlacesSetPageAnnotationTransaction(aURI, aAnnotationObject),
|
||||||
|
|
||||||
editBookmarkKeyword: function(aItemId, aNewKeyword)
|
editBookmarkKeyword: (aItemId, aNewKeyword) =>
|
||||||
new PlacesEditBookmarkKeywordTransaction(aItemId, aNewKeyword),
|
new PlacesEditBookmarkKeywordTransaction(aItemId, aNewKeyword),
|
||||||
|
|
||||||
editBookmarkPostData: function(aItemId, aPostData)
|
editBookmarkPostData: (aItemId, aPostData) =>
|
||||||
new PlacesEditBookmarkPostDataTransaction(aItemId, aPostData),
|
new PlacesEditBookmarkPostDataTransaction(aItemId, aPostData),
|
||||||
|
|
||||||
editLivemarkSiteURI: function(aLivemarkId, aSiteURI)
|
editLivemarkSiteURI: (aLivemarkId, aSiteURI) =>
|
||||||
new PlacesEditLivemarkSiteURITransaction(aLivemarkId, aSiteURI),
|
new PlacesEditLivemarkSiteURITransaction(aLivemarkId, aSiteURI),
|
||||||
|
|
||||||
editLivemarkFeedURI: function(aLivemarkId, aFeedURI)
|
editLivemarkFeedURI: (aLivemarkId, aFeedURI) =>
|
||||||
new PlacesEditLivemarkFeedURITransaction(aLivemarkId, aFeedURI),
|
new PlacesEditLivemarkFeedURITransaction(aLivemarkId, aFeedURI),
|
||||||
|
|
||||||
editItemDateAdded: function(aItemId, aNewDateAdded)
|
editItemDateAdded: (aItemId, aNewDateAdded) =>
|
||||||
new PlacesEditItemDateAddedTransaction(aItemId, aNewDateAdded),
|
new PlacesEditItemDateAddedTransaction(aItemId, aNewDateAdded),
|
||||||
|
|
||||||
editItemLastModified: function(aItemId, aNewLastModified)
|
editItemLastModified: (aItemId, aNewLastModified) =>
|
||||||
new PlacesEditItemLastModifiedTransaction(aItemId, aNewLastModified),
|
new PlacesEditItemLastModifiedTransaction(aItemId, aNewLastModified),
|
||||||
|
|
||||||
sortFolderByName: function(aFolderId)
|
sortFolderByName: (aFolderId) =>
|
||||||
new PlacesSortFolderByNameTransaction(aFolderId),
|
new PlacesSortFolderByNameTransaction(aFolderId),
|
||||||
|
|
||||||
tagURI: function(aURI, aTags)
|
tagURI: (aURI, aTags) =>
|
||||||
new PlacesTagURITransaction(aURI, aTags),
|
new PlacesTagURITransaction(aURI, aTags),
|
||||||
|
|
||||||
untagURI: function(aURI, aTags)
|
untagURI: (aURI, aTags) =>
|
||||||
new PlacesUntagURITransaction(aURI, aTags),
|
new PlacesUntagURITransaction(aURI, aTags),
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -1327,49 +1329,53 @@ XPCOMUtils.defineLazyGetter(PlacesUIUtils, "ptm", function() {
|
||||||
////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////
|
||||||
//// nsITransactionManager forwarders.
|
//// nsITransactionManager forwarders.
|
||||||
|
|
||||||
beginBatch: function()
|
beginBatch: () =>
|
||||||
PlacesUtils.transactionManager.beginBatch(null),
|
PlacesUtils.transactionManager.beginBatch(null),
|
||||||
|
|
||||||
endBatch: function()
|
endBatch: () =>
|
||||||
PlacesUtils.transactionManager.endBatch(false),
|
PlacesUtils.transactionManager.endBatch(false),
|
||||||
|
|
||||||
doTransaction: function(txn)
|
doTransaction: (txn) =>
|
||||||
PlacesUtils.transactionManager.doTransaction(txn),
|
PlacesUtils.transactionManager.doTransaction(txn),
|
||||||
|
|
||||||
undoTransaction: function()
|
undoTransaction: () =>
|
||||||
PlacesUtils.transactionManager.undoTransaction(),
|
PlacesUtils.transactionManager.undoTransaction(),
|
||||||
|
|
||||||
redoTransaction: function()
|
redoTransaction: () =>
|
||||||
PlacesUtils.transactionManager.redoTransaction(),
|
PlacesUtils.transactionManager.redoTransaction(),
|
||||||
|
|
||||||
get numberOfUndoItems()
|
get numberOfUndoItems() {
|
||||||
PlacesUtils.transactionManager.numberOfUndoItems,
|
return PlacesUtils.transactionManager.numberOfUndoItems;
|
||||||
get numberOfRedoItems()
|
},
|
||||||
PlacesUtils.transactionManager.numberOfRedoItems,
|
get numberOfRedoItems() {
|
||||||
get maxTransactionCount()
|
return PlacesUtils.transactionManager.numberOfRedoItems;
|
||||||
PlacesUtils.transactionManager.maxTransactionCount,
|
},
|
||||||
set maxTransactionCount(val)
|
get maxTransactionCount() {
|
||||||
PlacesUtils.transactionManager.maxTransactionCount = val,
|
return PlacesUtils.transactionManager.maxTransactionCount;
|
||||||
|
},
|
||||||
|
set maxTransactionCount(val) {
|
||||||
|
PlacesUtils.transactionManager.maxTransactionCount = val;
|
||||||
|
},
|
||||||
|
|
||||||
clear: function()
|
clear: () =>
|
||||||
PlacesUtils.transactionManager.clear(),
|
PlacesUtils.transactionManager.clear(),
|
||||||
|
|
||||||
peekUndoStack: function()
|
peekUndoStack: () =>
|
||||||
PlacesUtils.transactionManager.peekUndoStack(),
|
PlacesUtils.transactionManager.peekUndoStack(),
|
||||||
|
|
||||||
peekRedoStack: function()
|
peekRedoStack: () =>
|
||||||
PlacesUtils.transactionManager.peekRedoStack(),
|
PlacesUtils.transactionManager.peekRedoStack(),
|
||||||
|
|
||||||
getUndoStack: function()
|
getUndoStack: () =>
|
||||||
PlacesUtils.transactionManager.getUndoStack(),
|
PlacesUtils.transactionManager.getUndoStack(),
|
||||||
|
|
||||||
getRedoStack: function()
|
getRedoStack: () =>
|
||||||
PlacesUtils.transactionManager.getRedoStack(),
|
PlacesUtils.transactionManager.getRedoStack(),
|
||||||
|
|
||||||
AddListener: function(aListener)
|
AddListener: (aListener) =>
|
||||||
PlacesUtils.transactionManager.AddListener(aListener),
|
PlacesUtils.transactionManager.AddListener(aListener),
|
||||||
|
|
||||||
RemoveListener: function(aListener)
|
RemoveListener: (aListener) =>
|
||||||
PlacesUtils.transactionManager.RemoveListener(aListener)
|
PlacesUtils.transactionManager.RemoveListener(aListener)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,5 @@ function searchBookmarks(aSearchString) {
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("SidebarFocused",
|
window.addEventListener("SidebarFocused",
|
||||||
function()
|
() => document.getElementById("search-box").focus(),
|
||||||
document.getElementById("search-box").focus(),
|
|
||||||
false);
|
false);
|
||||||
|
|
|
||||||
|
|
@ -18,11 +18,17 @@ function PlacesViewBase(aPlace) {
|
||||||
PlacesViewBase.prototype = {
|
PlacesViewBase.prototype = {
|
||||||
// The xul element that holds the entire view.
|
// The xul element that holds the entire view.
|
||||||
_viewElt: null,
|
_viewElt: null,
|
||||||
get viewElt() this._viewElt,
|
get viewElt() {
|
||||||
|
return this._viewElt;
|
||||||
|
},
|
||||||
|
|
||||||
get associatedElement() this._viewElt,
|
get associatedElement() {
|
||||||
|
return this._viewElt;
|
||||||
|
},
|
||||||
|
|
||||||
get controllers() this._viewElt.controllers,
|
get controllers() {
|
||||||
|
return this._viewElt.controllers;
|
||||||
|
},
|
||||||
|
|
||||||
// The xul element that represents the root container.
|
// The xul element that represents the root container.
|
||||||
_rootElt: null,
|
_rootElt: null,
|
||||||
|
|
@ -36,7 +42,9 @@ PlacesViewBase.prototype = {
|
||||||
Components.interfaces.nsISupportsWeakReference]),
|
Components.interfaces.nsISupportsWeakReference]),
|
||||||
|
|
||||||
_place: "",
|
_place: "",
|
||||||
get place() this._place,
|
get place() {
|
||||||
|
return this._place;
|
||||||
|
},
|
||||||
set place(val) {
|
set place(val) {
|
||||||
this._place = val;
|
this._place = val;
|
||||||
|
|
||||||
|
|
@ -53,7 +61,9 @@ PlacesViewBase.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_result: null,
|
_result: null,
|
||||||
get result() this._result,
|
get result() {
|
||||||
|
return this._result;
|
||||||
|
},
|
||||||
set result(val) {
|
set result(val) {
|
||||||
if (this._result == val)
|
if (this._result == val)
|
||||||
return val;
|
return val;
|
||||||
|
|
@ -101,9 +111,13 @@ PlacesViewBase.prototype = {
|
||||||
return node;
|
return node;
|
||||||
},
|
},
|
||||||
|
|
||||||
get controller() this._controller,
|
get controller() {
|
||||||
|
return this._controller;
|
||||||
|
},
|
||||||
|
|
||||||
get selType() "single",
|
get selType() {
|
||||||
|
return "single";
|
||||||
|
},
|
||||||
selectItems: function() { },
|
selectItems: function() { },
|
||||||
selectAll: function() { },
|
selectAll: function() { },
|
||||||
|
|
||||||
|
|
@ -122,7 +136,9 @@ PlacesViewBase.prototype = {
|
||||||
return null;
|
return null;
|
||||||
},
|
},
|
||||||
|
|
||||||
get hasSelection() this.selectedNode != null,
|
get hasSelection() {
|
||||||
|
return this.selectedNode != null;
|
||||||
|
},
|
||||||
|
|
||||||
get selectedNodes() {
|
get selectedNodes() {
|
||||||
let selectedNode = this.selectedNode;
|
let selectedNode = this.selectedNode;
|
||||||
|
|
@ -140,7 +156,9 @@ PlacesViewBase.prototype = {
|
||||||
return [this.selectedNodes];
|
return [this.selectedNodes];
|
||||||
},
|
},
|
||||||
|
|
||||||
get draggableSelection() [this._draggedElt],
|
get draggableSelection() {
|
||||||
|
return [this._draggedElt];
|
||||||
|
},
|
||||||
|
|
||||||
get insertionPoint() {
|
get insertionPoint() {
|
||||||
// There is no insertion point for history queries, so bail out now and
|
// There is no insertion point for history queries, so bail out now and
|
||||||
|
|
@ -706,7 +724,9 @@ PlacesViewBase.prototype = {
|
||||||
.direction == "rtl";
|
.direction == "rtl";
|
||||||
},
|
},
|
||||||
|
|
||||||
get ownerWindow() window,
|
get ownerWindow() {
|
||||||
|
return window;
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds an "Open All in Tabs" menuitem to the bottom of the popup.
|
* Adds an "Open All in Tabs" menuitem to the bottom of the popup.
|
||||||
|
|
|
||||||
|
|
@ -1437,7 +1437,9 @@ PlacesController.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
_cutNodes: [],
|
_cutNodes: [],
|
||||||
get cutNodes() this._cutNodes,
|
get cutNodes() {
|
||||||
|
return this._cutNodes;
|
||||||
|
},
|
||||||
set cutNodes(aNodes) {
|
set cutNodes(aNodes) {
|
||||||
let self = this;
|
let self = this;
|
||||||
function updateCutNodes(aValue) {
|
function updateCutNodes(aValue) {
|
||||||
|
|
@ -1506,7 +1508,7 @@ PlacesController.prototype = {
|
||||||
[ PlacesUtils.TYPE_X_MOZ_PLACE,
|
[ PlacesUtils.TYPE_X_MOZ_PLACE,
|
||||||
PlacesUtils.TYPE_X_MOZ_URL,
|
PlacesUtils.TYPE_X_MOZ_URL,
|
||||||
PlacesUtils.TYPE_UNICODE,
|
PlacesUtils.TYPE_UNICODE,
|
||||||
].forEach(function(type) xferable.addDataFlavor(type));
|
].forEach(type => xferable.addDataFlavor(type));
|
||||||
|
|
||||||
this.clipboard.getData(xferable, Ci.nsIClipboard.kGlobalClipboard);
|
this.clipboard.getData(xferable, Ci.nsIClipboard.kGlobalClipboard);
|
||||||
|
|
||||||
|
|
@ -1583,8 +1585,9 @@ PlacesController.prototype = {
|
||||||
* @return true if there's a cached mozILivemarkInfo object for
|
* @return true if there's a cached mozILivemarkInfo object for
|
||||||
* aNode, false otherwise.
|
* aNode, false otherwise.
|
||||||
*/
|
*/
|
||||||
hasCachedLivemarkInfo: function(aNode)
|
hasCachedLivemarkInfo: function(aNode) {
|
||||||
this._cachedLivemarkInfoObjects.has(aNode),
|
return this._cachedLivemarkInfoObjects.has(aNode)
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the cached livemark info for a node, if set by cacheLivemarkInfo,
|
* Returns the cached livemark info for a node, if set by cacheLivemarkInfo,
|
||||||
|
|
@ -1593,8 +1596,9 @@ PlacesController.prototype = {
|
||||||
* a places result node.
|
* a places result node.
|
||||||
* @return the mozILivemarkInfo object for aNode, if set, null otherwise.
|
* @return the mozILivemarkInfo object for aNode, if set, null otherwise.
|
||||||
*/
|
*/
|
||||||
getCachedLivemarkInfo: function(aNode)
|
getCachedLivemarkInfo: function(aNode) {
|
||||||
this._cachedLivemarkInfoObjects.get(aNode, null)
|
return this._cachedLivemarkInfoObjects.get(aNode, null)
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
Components.interfaces.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING;
|
Components.interfaces.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING;
|
||||||
|
|
||||||
ContentArea.setContentViewForQueryString(DOWNLOADS_QUERY,
|
ContentArea.setContentViewForQueryString(DOWNLOADS_QUERY,
|
||||||
function() new DownloadsPlacesView(document.getElementById("downloadsRichListBox"), false),
|
() => new DownloadsPlacesView(document.getElementById("downloadsRichListBox"), false),
|
||||||
{ showDetailsPane: false,
|
{ showDetailsPane: false,
|
||||||
toolbarSet: "back-button, forward-button, organizeButton, clearDownloadsButton, libraryToolbarSpacer, searchFilter" });
|
toolbarSet: "back-button, forward-button, organizeButton, clearDownloadsButton, libraryToolbarSpacer, searchFilter" });
|
||||||
]]></script>
|
]]></script>
|
||||||
|
|
|
||||||
|
|
@ -709,7 +709,7 @@ var gEditItemOverlay = {
|
||||||
this._folderMenuList.selectedItem = item;
|
this._folderMenuList.selectedItem = item;
|
||||||
// XXXmano HACK: setTimeout 100, otherwise focus goes back to the
|
// XXXmano HACK: setTimeout 100, otherwise focus goes back to the
|
||||||
// menulist right away
|
// menulist right away
|
||||||
setTimeout(function(self) self.toggleFolderTreeVisibility(), 100, this);
|
setTimeout(() => this.toggleFolderTreeVisibility(), 100);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -873,7 +873,7 @@ var gEditItemOverlay = {
|
||||||
let tags = this._element("tagsField").value;
|
let tags = this._element("tagsField").value;
|
||||||
return tags.trim()
|
return tags.trim()
|
||||||
.split(/\s*,\s*/) // Split on commas and remove spaces.
|
.split(/\s*,\s*/) // Split on commas and remove spaces.
|
||||||
.filter(function(tag) tag.length > 0); // Kill empty tags.
|
.filter(tag => tag.length > 0); // Kill empty tags.
|
||||||
},
|
},
|
||||||
|
|
||||||
newFolder: function() {
|
newFolder: function() {
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,5 @@ function searchHistory(aInput)
|
||||||
}
|
}
|
||||||
|
|
||||||
window.addEventListener("SidebarFocused",
|
window.addEventListener("SidebarFocused",
|
||||||
function()
|
() => gSearchBox.focus(),
|
||||||
gSearchBox.focus(),
|
|
||||||
false);
|
false);
|
||||||
|
|
|
||||||
|
|
@ -555,7 +555,7 @@ var PlacesOrganizer = {
|
||||||
infoBox.setAttribute("minimal", "true");
|
infoBox.setAttribute("minimal", "true");
|
||||||
infoBox.removeAttribute("wasminimal");
|
infoBox.removeAttribute("wasminimal");
|
||||||
infoBoxExpanderWrapper.hidden =
|
infoBoxExpanderWrapper.hidden =
|
||||||
this._additionalInfoFields.every(function(id)
|
this._additionalInfoFields.every(id =>
|
||||||
document.getElementById(id).collapsed);
|
document.getElementById(id).collapsed);
|
||||||
}
|
}
|
||||||
additionalInfoBroadcaster.hidden = infoBox.getAttribute("minimal") == "true";
|
additionalInfoBroadcaster.hidden = infoBox.getAttribute("minimal") == "true";
|
||||||
|
|
@ -1416,7 +1416,9 @@ var ContentArea = {
|
||||||
options: aOptions || new Object() });
|
options: aOptions || new Object() });
|
||||||
},
|
},
|
||||||
|
|
||||||
get currentView() PlacesUIUtils.getViewForNode(this._deck.selectedPanel),
|
get currentView() {
|
||||||
|
return PlacesUIUtils.getViewForNode(this._deck.selectedPanel);
|
||||||
|
},
|
||||||
set currentView(aNewView) {
|
set currentView(aNewView) {
|
||||||
let oldView = this.currentView;
|
let oldView = this.currentView;
|
||||||
if (oldView != aNewView) {
|
if (oldView != aNewView) {
|
||||||
|
|
@ -1430,7 +1432,9 @@ var ContentArea = {
|
||||||
return aNewView;
|
return aNewView;
|
||||||
},
|
},
|
||||||
|
|
||||||
get currentPlace() this.currentView.place,
|
get currentPlace() {
|
||||||
|
return this.currentView.place;
|
||||||
|
},
|
||||||
set currentPlace(aQueryString) {
|
set currentPlace(aQueryString) {
|
||||||
let oldView = this.currentView;
|
let oldView = this.currentView;
|
||||||
let newView = this.getContentViewForQueryString(aQueryString);
|
let newView = this.getContentViewForQueryString(aQueryString);
|
||||||
|
|
@ -1495,12 +1499,16 @@ var ContentTree = {
|
||||||
this._view = document.getElementById("placeContent");
|
this._view = document.getElementById("placeContent");
|
||||||
},
|
},
|
||||||
|
|
||||||
get view() this._view,
|
get view() {
|
||||||
|
return this._view;
|
||||||
|
},
|
||||||
|
|
||||||
get viewOptions() Object.seal({
|
get viewOptions() {
|
||||||
|
return Object.seal({
|
||||||
showDetailsPane: true,
|
showDetailsPane: true,
|
||||||
toolbarSet: "back-button, forward-button, organizeButton, viewMenu, maintenanceButton, libraryToolbarSpacer, searchFilter"
|
toolbarSet: "back-button, forward-button, organizeButton, viewMenu, maintenanceButton, libraryToolbarSpacer, searchFilter"
|
||||||
}),
|
});
|
||||||
|
},
|
||||||
|
|
||||||
openSelectedNode: function(aEvent) {
|
openSelectedNode: function(aEvent) {
|
||||||
let view = this.view;
|
let view = this.view;
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,9 @@ function PlacesTreeView(aFlatList, aOnOpenFlatContainer, aController) {
|
||||||
}
|
}
|
||||||
|
|
||||||
PlacesTreeView.prototype = {
|
PlacesTreeView.prototype = {
|
||||||
get wrappedJSObject() this,
|
get wrappedJSObject() {
|
||||||
|
return this;
|
||||||
|
},
|
||||||
|
|
||||||
__dateService: null,
|
__dateService: null,
|
||||||
get _dateService() {
|
get _dateService() {
|
||||||
|
|
@ -1080,7 +1082,9 @@ PlacesTreeView.prototype = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
get result() this._result,
|
get result() {
|
||||||
|
return this._result;
|
||||||
|
},
|
||||||
set result(val) {
|
set result(val) {
|
||||||
if (this._result) {
|
if (this._result) {
|
||||||
this._result.removeObserver(this);
|
this._result.removeObserver(this);
|
||||||
|
|
@ -1132,9 +1136,15 @@ PlacesTreeView.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// nsITreeView
|
// nsITreeView
|
||||||
get rowCount() this._rows.length,
|
get rowCount() {
|
||||||
get selection() this._selection,
|
return this._rows.length;
|
||||||
set selection(val) this._selection = val,
|
},
|
||||||
|
get selection() {
|
||||||
|
return this._selection;
|
||||||
|
},
|
||||||
|
set selection(val) {
|
||||||
|
this._selection = val;
|
||||||
|
},
|
||||||
|
|
||||||
getRowProperties: function() { return ""; },
|
getRowProperties: function() { return ""; },
|
||||||
|
|
||||||
|
|
@ -1405,7 +1415,9 @@ PlacesTreeView.prototype = {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
getLevel: function(aRow) this._getNodeForRow(aRow).indentLevel,
|
getLevel: function(aRow) {
|
||||||
|
return this._getNodeForRow(aRow).indentLevel;
|
||||||
|
},
|
||||||
|
|
||||||
getImageSrc: function(aRow, aColumn) {
|
getImageSrc: function(aRow, aColumn) {
|
||||||
// Only the title column has an image.
|
// Only the title column has an image.
|
||||||
|
|
|
||||||
|
|
@ -402,7 +402,7 @@ HandlerInfoWrapper.prototype = {
|
||||||
var disabledPluginTypes = this._getDisabledPluginTypes();
|
var disabledPluginTypes = this._getDisabledPluginTypes();
|
||||||
|
|
||||||
var type = this.type;
|
var type = this.type;
|
||||||
disabledPluginTypes = disabledPluginTypes.filter(function(v) v != type);
|
disabledPluginTypes = disabledPluginTypes.filter(v => v != type);
|
||||||
|
|
||||||
this._prefSvc.setCharPref(PREF_DISABLED_PLUGIN_TYPES,
|
this._prefSvc.setCharPref(PREF_DISABLED_PLUGIN_TYPES,
|
||||||
disabledPluginTypes.join(","));
|
disabledPluginTypes.join(","));
|
||||||
|
|
@ -1498,7 +1498,7 @@ var gApplicationsPane = {
|
||||||
case Ci.nsIHandlerInfo.useHelperApp:
|
case Ci.nsIHandlerInfo.useHelperApp:
|
||||||
if (preferredApp)
|
if (preferredApp)
|
||||||
menu.selectedItem =
|
menu.selectedItem =
|
||||||
possibleAppMenuItems.filter(function(v) v.handlerApp.equals(preferredApp))[0];
|
possibleAppMenuItems.filter(v => v.handlerApp.equals(preferredApp))[0];
|
||||||
break;
|
break;
|
||||||
case kActionUsePlugin:
|
case kActionUsePlugin:
|
||||||
menu.selectedItem = pluginMenuItem;
|
menu.selectedItem = pluginMenuItem;
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,9 @@ var gMainPane = {
|
||||||
{
|
{
|
||||||
let homePage = document.getElementById("browser.startup.homepage");
|
let homePage = document.getElementById("browser.startup.homepage");
|
||||||
let tabs = this._getTabsForHomePage();
|
let tabs = this._getTabsForHomePage();
|
||||||
function getTabURI(t) t.linkedBrowser.currentURI.spec;
|
function getTabURI(t) {
|
||||||
|
return t.linkedBrowser.currentURI.spec;
|
||||||
|
}
|
||||||
|
|
||||||
// FIXME Bug 244192: using dangerous "|" joiner!
|
// FIXME Bug 244192: using dangerous "|" joiner!
|
||||||
if (tabs.length)
|
if (tabs.length)
|
||||||
|
|
|
||||||
|
|
@ -88,8 +88,7 @@ var gPrivacyPane = {
|
||||||
initializeHistoryMode: function()
|
initializeHistoryMode: function()
|
||||||
{
|
{
|
||||||
let mode;
|
let mode;
|
||||||
let getVal = function(aPref)
|
let getVal = aPref => document.getElementById(aPref).value;
|
||||||
document.getElementById(aPref).value;
|
|
||||||
|
|
||||||
if (this._checkDefaultValues(this.prefsForDefault)) {
|
if (this._checkDefaultValues(this.prefsForDefault)) {
|
||||||
if (getVal("browser.privatebrowsing.autostart"))
|
if (getVal("browser.privatebrowsing.autostart"))
|
||||||
|
|
|
||||||
|
|
@ -3982,8 +3982,8 @@ var SessionStoreInternal = {
|
||||||
*/
|
*/
|
||||||
_isCmdLineEmpty: function(aWindow, aState) {
|
_isCmdLineEmpty: function(aWindow, aState) {
|
||||||
var pinnedOnly = aState.windows &&
|
var pinnedOnly = aState.windows &&
|
||||||
aState.windows.every(function(win)
|
aState.windows.every(win =>
|
||||||
win.tabs.every(function(tab) tab.pinned));
|
win.tabs.every(tab => tab.pinned));
|
||||||
|
|
||||||
let hasFirstArgument = aWindow.arguments && aWindow.arguments[0];
|
let hasFirstArgument = aWindow.arguments && aWindow.arguments[0];
|
||||||
if (!pinnedOnly) {
|
if (!pinnedOnly) {
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,10 @@ var gSyncSetup = {
|
||||||
server: false
|
server: false
|
||||||
},
|
},
|
||||||
|
|
||||||
get _remoteSites() [Weave.Service.serverURL, RECAPTCHA_DOMAIN],
|
get _remoteSites() {
|
||||||
|
return [Weave.Service.serverURL, RECAPTCHA_DOMAIN];
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
get _usingMainServers() {
|
get _usingMainServers() {
|
||||||
if (this._settingUpNew)
|
if (this._settingUpNew)
|
||||||
|
|
@ -78,7 +81,7 @@ var gSyncSetup = {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
addRem(true);
|
addRem(true);
|
||||||
window.addEventListener("unload", function() addRem(false), false);
|
window.addEventListener("unload", () => addRem(false), false);
|
||||||
|
|
||||||
window.setTimeout(function() {
|
window.setTimeout(function() {
|
||||||
// Force Service to be loaded so that engines are registered.
|
// Force Service to be loaded so that engines are registered.
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ var Windows8WindowFrameColor = {
|
||||||
// Zero-pad the number just to make sure that it is 8 digits.
|
// Zero-pad the number just to make sure that it is 8 digits.
|
||||||
windowFrameColorHex = ("00000000" + windowFrameColorHex).substr(-8);
|
windowFrameColorHex = ("00000000" + windowFrameColorHex).substr(-8);
|
||||||
let windowFrameColorArray = windowFrameColorHex.match(/../g);
|
let windowFrameColorArray = windowFrameColorHex.match(/../g);
|
||||||
let [unused, fgR, fgG, fgB] = windowFrameColorArray.map(function(val) parseInt(val, 16));
|
let [unused, fgR, fgG, fgB] = windowFrameColorArray.map(val => parseInt(val, 16));
|
||||||
let windowFrameColorBalance = WindowsRegistry.readRegKey(HKCU, dwmKey,
|
let windowFrameColorBalance = WindowsRegistry.readRegKey(HKCU, dwmKey,
|
||||||
"ColorizationColorBalance");
|
"ColorizationColorBalance");
|
||||||
// Default to balance=78 if reg key isn't defined
|
// Default to balance=78 if reg key isn't defined
|
||||||
|
|
|
||||||
|
|
@ -102,8 +102,8 @@ var tasksCfg = [
|
||||||
*/
|
*/
|
||||||
// Open new tab
|
// Open new tab
|
||||||
{
|
{
|
||||||
get title() _getString("taskbar.tasks.newTab.label"),
|
get title() { return _getString("taskbar.tasks.newTab.label"); },
|
||||||
get description() _getString("taskbar.tasks.newTab.description"),
|
get description() { return _getString("taskbar.tasks.newTab.description"); },
|
||||||
args: "-new-tab about:blank",
|
args: "-new-tab about:blank",
|
||||||
iconIndex: 3, // New window icon
|
iconIndex: 3, // New window icon
|
||||||
open: true,
|
open: true,
|
||||||
|
|
@ -114,8 +114,8 @@ var tasksCfg = [
|
||||||
|
|
||||||
// Open new window
|
// Open new window
|
||||||
{
|
{
|
||||||
get title() _getString("taskbar.tasks.newWindow.label"),
|
get title() { return _getString("taskbar.tasks.newWindow.label"); },
|
||||||
get description() _getString("taskbar.tasks.newWindow.description"),
|
get description() { return _getString("taskbar.tasks.newWindow.description"); },
|
||||||
args: "-browser",
|
args: "-browser",
|
||||||
iconIndex: 2, // New tab icon
|
iconIndex: 2, // New tab icon
|
||||||
open: true,
|
open: true,
|
||||||
|
|
@ -125,8 +125,8 @@ var tasksCfg = [
|
||||||
|
|
||||||
// Open new private window
|
// Open new private window
|
||||||
{
|
{
|
||||||
get title() _getString("taskbar.tasks.newPrivateWindow.label"),
|
get title() { return _getString("taskbar.tasks.newPrivateWindow.label"); },
|
||||||
get description() _getString("taskbar.tasks.newPrivateWindow.description"),
|
get description() { return _getString("taskbar.tasks.newPrivateWindow.description"); },
|
||||||
args: "-private-window",
|
args: "-private-window",
|
||||||
iconIndex: 4, // Private browsing mode icon
|
iconIndex: 4, // Private browsing mode icon
|
||||||
open: true,
|
open: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue