summaryrefslogtreecommitdiffstats
path: root/browser/components/places/content
diff options
context:
space:
mode:
Diffstat (limited to 'browser/components/places/content')
-rw-r--r--browser/components/places/content/browserPlacesViews.js12
-rw-r--r--browser/components/places/content/controller.js10
-rw-r--r--browser/components/places/content/places-menupopup.js2
-rw-r--r--browser/components/places/content/places-tree.js8
-rw-r--r--browser/components/places/content/places.js8
-rw-r--r--browser/components/places/content/treeView.js26
6 files changed, 31 insertions, 35 deletions
diff --git a/browser/components/places/content/browserPlacesViews.js b/browser/components/places/content/browserPlacesViews.js
index 35cdd2b9d5..1d849e3297 100644
--- a/browser/components/places/content/browserPlacesViews.js
+++ b/browser/components/places/content/browserPlacesViews.js
@@ -277,7 +277,7 @@ class PlacesViewBase {
return this.controller.buildContextMenu(aPopup);
}
- destroyContextMenu(aPopup) {
+ destroyContextMenu() {
this._contextMenuShown = null;
}
@@ -458,7 +458,7 @@ class PlacesViewBase {
}
}
- nodeURIChanged(aPlacesNode, aURIString) {
+ nodeURIChanged(aPlacesNode) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode, true);
// There's no DOM node, thus there's nothing to be done when the URI changes.
@@ -519,7 +519,7 @@ class PlacesViewBase {
}
}
- nodeRemoved(aParentPlacesNode, aPlacesNode, aIndex) {
+ nodeRemoved(aParentPlacesNode, aPlacesNode) {
let parentElt = this._getDOMNodeForPlacesNode(aParentPlacesNode);
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
@@ -1689,7 +1689,7 @@ class PlacesToolbar extends PlacesViewBase {
}
}
- _onMouseOut(aEvent) {
+ _onMouseOut() {
window.XULBrowserWindow.setOverLink("");
}
@@ -1852,7 +1852,7 @@ class PlacesToolbar extends PlacesViewBase {
aEvent.stopPropagation();
}
- _onDragLeave(aEvent) {
+ _onDragLeave() {
PlacesControllerDragHelper.currentDropTarget = null;
this._dropIndicator.collapsed = true;
@@ -1863,7 +1863,7 @@ class PlacesToolbar extends PlacesViewBase {
}
}
- _onDragEnd(aEvent) {
+ _onDragEnd() {
this._cleanupDragDetails();
}
diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js
index 3c113137df..6eaa129961 100644
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -102,7 +102,7 @@ PlacesController.prototype = {
QueryInterface: ChromeUtils.generateQI(["nsIClipboardOwner"]),
// nsIClipboardOwner
- LosingOwnership: function PC_LosingOwnership(aXferable) {
+ LosingOwnership: function PC_LosingOwnership() {
this.cutNodes = [];
},
@@ -333,7 +333,7 @@ PlacesController.prototype = {
}
},
- onEvent: function PC_onEvent(eventName) {},
+ onEvent: function PC_onEvent() {},
/**
* Determine whether or not the selection can be removed, either by the
@@ -378,8 +378,12 @@ PlacesController.prototype = {
*/
_isRepeatedRemoveOperation() {
let lastRemoveOperationFingerprint = this._lastRemoveOperationFingerprint;
+ // .bookmarkGuid and .pageGuid may either be null or an empty string. While
+ // that should probably change, it's safer to use || here.
this._lastRemoveOperationFingerprint = PlacesUtils.sha256(
- this._view.selectedNodes.map(n => n.guid ?? n.uri).join()
+ this._view.selectedNodes
+ .map(n => n.bookmarkGuid || (n.pageGuid || n.uri) + n.time)
+ .join()
);
return (
lastRemoveOperationFingerprint == this._lastRemoveOperationFingerprint
diff --git a/browser/components/places/content/places-menupopup.js b/browser/components/places/content/places-menupopup.js
index 1d7615aa27..df00268563 100644
--- a/browser/components/places/content/places-menupopup.js
+++ b/browser/components/places/content/places-menupopup.js
@@ -583,7 +583,7 @@ function closingPopupEndsDrag(popup) {
event.stopPropagation();
}
- on_dragend(event) {
+ on_dragend() {
this._cleanupDragDetails();
}
}
diff --git a/browser/components/places/content/places-tree.js b/browser/components/places/content/places-tree.js
index 08437b5e08..9e43558732 100644
--- a/browser/components/places/content/places-tree.js
+++ b/browser/components/places/content/places-tree.js
@@ -15,14 +15,14 @@
constructor() {
super();
- this.addEventListener("focus", event => {
+ this.addEventListener("focus", () => {
this._cachedInsertionPoint = undefined;
// See select handler. We need the sidebar's places commandset to be
// updated as well
document.commandDispatcher.updateCommands("focus");
});
- this.addEventListener("select", event => {
+ this.addEventListener("select", () => {
this._cachedInsertionPoint = undefined;
// This additional complexity is here for the sidebars
@@ -125,7 +125,7 @@
event.stopPropagation();
});
- this.addEventListener("dragend", event => {
+ this.addEventListener("dragend", () => {
this._isDragSource = false;
PlacesControllerDragHelper.currentDropTarget = null;
});
@@ -841,7 +841,7 @@
return this.controller.buildContextMenu(aPopup);
}
- destroyContextMenu(aPopup) {}
+ destroyContextMenu() {}
disconnectedCallback() {
window.removeEventListener("unload", this.disconnectedCallback);
diff --git a/browser/components/places/content/places.js b/browser/components/places/content/places.js
index b58cee70d5..685fa12b51 100644
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -500,7 +500,7 @@ var PlacesOrganizer = {
};
fp.init(
- window,
+ window.browsingContext,
PlacesUIUtils.promptLocalization.formatValueSync(
"places-bookmarks-import"
),
@@ -525,7 +525,7 @@ var PlacesOrganizer = {
};
fp.init(
- window,
+ window.browsingContext,
PlacesUIUtils.promptLocalization.formatValueSync(
"places-bookmarks-export"
),
@@ -638,7 +638,7 @@ var PlacesOrganizer = {
"places-bookmarks-restore-title",
"places-bookmarks-restore-filter-name",
]);
- fp.init(window, title, Ci.nsIFilePicker.modeOpen);
+ fp.init(window.browsingContext, title, Ci.nsIFilePicker.modeOpen);
fp.appendFilter(filterName, RESTORE_FILEPICKER_FILTER_EXT);
fp.appendFilters(Ci.nsIFilePicker.filterAll);
fp.displayDirectory = backupsDir;
@@ -711,7 +711,7 @@ var PlacesOrganizer = {
"places-bookmarks-backup-title",
"places-bookmarks-restore-filter-name",
]);
- fp.init(window, title, Ci.nsIFilePicker.modeSave);
+ fp.init(window.browsingContext, title, Ci.nsIFilePicker.modeSave);
fp.appendFilter(filterName, RESTORE_FILEPICKER_FILTER_EXT);
fp.defaultString = PlacesBackups.getFilenameForDate();
fp.defaultExtension = "json";
diff --git a/browser/components/places/content/treeView.js b/browser/components/places/content/treeView.js
index f9b6eb6f9a..2a9c483113 100644
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -927,7 +927,7 @@ PlacesTreeView.prototype = {
}
},
- nodeTitleChanged: function PTV_nodeTitleChanged(aNode, aNewTitle) {
+ nodeTitleChanged: function PTV_nodeTitleChanged(aNode) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
},
@@ -949,8 +949,7 @@ PlacesTreeView.prototype = {
nodeHistoryDetailsChanged: function PTV_nodeHistoryDetailsChanged(
aNode,
- aOldVisitDate,
- aOldVisitCount
+ aOldVisitDate
) {
this._nodeDetails.delete(
makeNodeDetailsKey({
@@ -969,24 +968,17 @@ PlacesTreeView.prototype = {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_TAGS);
},
- nodeKeywordChanged(aNode, aNewKeyword) {},
+ nodeKeywordChanged() {},
- nodeDateAddedChanged: function PTV_nodeDateAddedChanged(aNode, aNewValue) {
+ nodeDateAddedChanged: function PTV_nodeDateAddedChanged(aNode) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_DATEADDED);
},
- nodeLastModifiedChanged: function PTV_nodeLastModifiedChanged(
- aNode,
- aNewValue
- ) {
+ nodeLastModifiedChanged: function PTV_nodeLastModifiedChanged(aNode) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_LASTMODIFIED);
},
- containerStateChanged: function PTV_containerStateChanged(
- aNode,
- aOldState,
- aNewState
- ) {
+ containerStateChanged: function PTV_containerStateChanged(aNode) {
this.invalidateContainer(aNode);
},
@@ -1340,7 +1332,7 @@ PlacesTreeView.prototype = {
return props + " " + properties;
},
- getColumnProperties(aColumn) {
+ getColumnProperties() {
return "";
},
@@ -1576,7 +1568,7 @@ PlacesTreeView.prototype = {
return node.icon;
},
- getCellValue(aRow, aColumn) {},
+ getCellValue() {},
getCellText: function PTV_getCellText(aRow, aColumn) {
let node = this._getNodeForRow(aRow);
@@ -1858,5 +1850,5 @@ PlacesTreeView.prototype = {
},
selectionChanged() {},
- cycleCell(aRow, aColumn) {},
+ cycleCell() {},
};