summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basilisk/components/places/PlacesUIUtils.jsm44
-rw-r--r--basilisk/components/places/content/bookmarkProperties.js20
-rw-r--r--basilisk/components/places/content/browserPlacesViews.js98
-rw-r--r--basilisk/components/places/content/controller.js68
-rw-r--r--basilisk/components/places/content/editBookmarkOverlay.js2
-rw-r--r--basilisk/components/places/content/moveBookmarks.js4
-rw-r--r--basilisk/components/places/content/places.js88
-rw-r--r--basilisk/components/places/content/sidebarUtils.js8
-rw-r--r--basilisk/components/places/content/treeView.js90
9 files changed, 211 insertions, 211 deletions
diff --git a/basilisk/components/places/PlacesUIUtils.jsm b/basilisk/components/places/PlacesUIUtils.jsm
index 035fc12..dc0463c 100644
--- a/basilisk/components/places/PlacesUIUtils.jsm
+++ b/basilisk/components/places/PlacesUIUtils.jsm
@@ -231,11 +231,11 @@ this.PlacesUIUtils = {
* The string spec of the URI
* @return A URI object for the spec.
*/
- createFixedURI: function PUIU_createFixedURI(aSpec) {
+ createFixedURI: function(aSpec) {
return URIFixup.createFixupURI(aSpec, Ci.nsIURIFixup.FIXUP_FLAG_NONE);
},
- getFormattedString: function PUIU_getFormattedString(key, params) {
+ getFormattedString: function(key, params) {
return bundle.formatStringFromName(key, params, params.length);
},
@@ -254,7 +254,7 @@ this.PlacesUIUtils = {
* @see https://developer.mozilla.org/en/Localization_and_Plurals
* @return The localized plural string.
*/
- getPluralString: function PUIU_getPluralString(aKey, aNumber, aParams) {
+ getPluralString: function(aKey, aNumber, aParams) {
let str = PluralForm.get(aNumber, bundle.GetStringFromName(aKey));
// Replace #1 with aParams[0], #2 with aParams[1], and so on.
@@ -264,7 +264,7 @@ this.PlacesUIUtils = {
});
},
- getString: function PUIU_getString(key) {
+ getString: function(key) {
return bundle.GetStringFromName(key);
},
@@ -660,7 +660,7 @@ this.PlacesUIUtils = {
return ("performed" in aInfo && aInfo.performed);
},
- _getTopBrowserWin: function PUIU__getTopBrowserWin() {
+ _getTopBrowserWin: function() {
return RecentWindow.getMostRecentBrowserWindow();
},
@@ -683,7 +683,7 @@ this.PlacesUIUtils = {
* a DOM node
* @return the closet ancestor places view if exists, null otherwsie.
*/
- getViewForNode: function PUIU_getViewForNode(aNode) {
+ getViewForNode: function(aNode) {
let node = aNode;
// The view for a <menu> of which its associated menupopup is a places
@@ -712,7 +712,7 @@ this.PlacesUIUtils = {
* organizer. If this is not called visits will be marked as
* TRANSITION_LINK.
*/
- markPageAsTyped: function PUIU_markPageAsTyped(aURL) {
+ markPageAsTyped: function(aURL) {
PlacesUtils.history.markPageAsTyped(this.createFixedURI(aURL));
},
@@ -723,7 +723,7 @@ this.PlacesUIUtils = {
* personal toolbar, and bookmarks from within the places organizer.
* If this is not called visits will be marked as TRANSITION_LINK.
*/
- markPageAsFollowedBookmark: function PUIU_markPageAsFollowedBookmark(aURL) {
+ markPageAsFollowedBookmark: function(aURL) {
PlacesUtils.history.markPageAsFollowedBookmark(this.createFixedURI(aURL));
},
@@ -733,7 +733,7 @@ this.PlacesUIUtils = {
* This is actually used to distinguish user-initiated visits in frames
* so automatic visits can be correctly ignored.
*/
- markPageAsFollowedLink: function PUIU_markPageAsFollowedLink(aURL) {
+ markPageAsFollowedLink: function(aURL) {
PlacesUtils.history.markPageAsFollowedLink(this.createFixedURI(aURL));
},
@@ -747,7 +747,7 @@ this.PlacesUIUtils = {
* @return true if it's safe to open the node in the browser, false otherwise.
*
*/
- checkURLSecurity: function PUIU_checkURLSecurity(aURINode, aWindow) {
+ checkURLSecurity: function(aURINode, aWindow) {
if (PlacesUtils.nodeIsBookmark(aURINode))
return true;
@@ -774,7 +774,7 @@ this.PlacesUIUtils = {
* @return A description string if a META element was discovered with a
* "description" or "httpequiv" attribute, empty string otherwise.
*/
- getDescriptionFromDocument: function PUIU_getDescriptionFromDocument(doc) {
+ getDescriptionFromDocument: function(doc) {
var metaElements = doc.getElementsByTagName("META");
for (var i = 0; i < metaElements.length; ++i) {
if (metaElements[i].name.toLowerCase() == "description" ||
@@ -792,7 +792,7 @@ this.PlacesUIUtils = {
* @return the description of the given item, or an empty string if it is
* not set.
*/
- getItemDescription: function PUIU_getItemDescription(aItemId) {
+ getItemDescription: function(aItemId) {
if (PlacesUtils.annotations.itemHasAnnotation(aItemId, this.DESCRIPTION_ANNO))
return PlacesUtils.annotations.getItemAnnotation(aItemId, this.DESCRIPTION_ANNO);
return "";
@@ -932,7 +932,7 @@ this.PlacesUIUtils = {
/** aItemsToOpen needs to be an array of objects of the form:
* {uri: string, isBookmark: boolean}
*/
- _openTabset: function PUIU__openTabset(aItemsToOpen, aEvent, aWindow) {
+ _openTabset: function(aItemsToOpen, aEvent, aWindow) {
if (!aItemsToOpen.length)
return;
@@ -1009,7 +1009,7 @@ this.PlacesUIUtils = {
}
},
- openURINodesInTabs: function PUIU_openURINodesInTabs(aNodes, aEvent, aView) {
+ openURINodesInTabs: function(aNodes, aEvent, aView) {
let window = aView.ownerWindow;
let urlsToOpen = [];
@@ -1044,12 +1044,12 @@ this.PlacesUIUtils = {
* web panel.
* see also openUILinkIn
*/
- openNodeIn: function PUIU_openNodeIn(aNode, aWhere, aView, aPrivate) {
+ openNodeIn: function(aNode, aWhere, aView, aPrivate) {
let window = aView.ownerWindow;
this._openNodeIn(aNode, aWhere, window, aPrivate);
},
- _openNodeIn: function PUIU_openNodeIn(aNode, aWhere, aWindow, aPrivate=false) {
+ _openNodeIn: function(aNode, aWhere, aWindow, aPrivate=false) {
if (aNode && PlacesUtils.nodeIsURI(aNode) &&
this.checkURLSecurity(aNode, aWindow)) {
let isBookmark = PlacesUtils.nodeIsBookmark(aNode);
@@ -1092,11 +1092,11 @@ this.PlacesUIUtils = {
*
* @note this is not supposed be perfect, so use it only for UI purposes.
*/
- guessUrlSchemeForUI: function PUIU_guessUrlSchemeForUI(aUrlString) {
+ guessUrlSchemeForUI: function(aUrlString) {
return aUrlString.substr(0, aUrlString.indexOf(":"));
},
- getBestTitle: function PUIU_getBestTitle(aNode, aDoNotCutTitle) {
+ getBestTitle: function(aNode, aDoNotCutTitle) {
var title;
if (!aNode.title && PlacesUtils.nodeIsURI(aNode)) {
// if node title is empty, try to set the label using host and filename
@@ -1284,7 +1284,7 @@ this.PlacesUIUtils = {
// Create a new left pane folder.
var callback = {
// Helper to create an organizer special query.
- create_query: function CB_create_query(aQueryName, aParentId, aQueryUrl) {
+ create_query: function(aQueryName, aParentId, aQueryUrl) {
let itemId = bs.insertBookmark(aParentId,
PlacesUtils._uri(aQueryUrl),
bs.DEFAULT_INDEX,
@@ -1301,7 +1301,7 @@ this.PlacesUIUtils = {
},
// Helper to create an organizer special folder.
- create_folder: function CB_create_folder(aFolderName, aParentId, aIsRoot) {
+ create_folder: function(aFolderName, aParentId, aIsRoot) {
// Left Pane Root Folder.
let folderId = bs.createFolder(aParentId,
queries[aFolderName].title,
@@ -1325,7 +1325,7 @@ this.PlacesUIUtils = {
return folderId;
},
- runBatched: function CB_runBatched(aUserData) {
+ runBatched: function(aUserData) {
delete PlacesUIUtils.leftPaneQueries;
PlacesUIUtils.leftPaneQueries = { };
@@ -1392,7 +1392,7 @@ this.PlacesUIUtils = {
* @param aItemId id of a container
* @return the name of the query, or empty string if not a left-pane query
*/
- getLeftPaneQueryNameFromId: function PUIU_getLeftPaneQueryNameFromId(aItemId) {
+ getLeftPaneQueryNameFromId: function(aItemId) {
var queryName = "";
// If the let pane hasn't been built, use the annotation service
// directly, to avoid building the left pane too early.
diff --git a/basilisk/components/places/content/bookmarkProperties.js b/basilisk/components/places/content/bookmarkProperties.js
index afcf657..1df113d 100644
--- a/basilisk/components/places/content/bookmarkProperties.js
+++ b/basilisk/components/places/content/bookmarkProperties.js
@@ -107,7 +107,7 @@ var BookmarkPropertiesPanel = {
* This method returns the correct label for the dialog's "accept"
* button based on the variant of the dialog.
*/
- _getAcceptLabel: function BPP__getAcceptLabel() {
+ _getAcceptLabel: function() {
if (this._action == ACTION_ADD) {
if (this._URIs.length)
return this._strings.getString("dialogAcceptLabelAddMulti");
@@ -127,7 +127,7 @@ var BookmarkPropertiesPanel = {
* This method returns the correct title for the current variant
* of this dialog.
*/
- _getDialogTitle: function BPP__getDialogTitle() {
+ _getDialogTitle: function() {
if (this._action == ACTION_ADD) {
if (this._itemType == BOOKMARK_ITEM)
return this._strings.getString("dialogTitleAddBookmark");
@@ -255,7 +255,7 @@ var BookmarkPropertiesPanel = {
*
* @returns a title string
*/
- _getURITitleFromHistory: function BPP__getURITitleFromHistory(aURI) {
+ _getURITitleFromHistory: function(aURI) {
NS_ASSERT(aURI instanceof Ci.nsIURI);
// get the title from History
@@ -355,7 +355,7 @@ var BookmarkPropertiesPanel = {
}),
// nsIDOMEventListener
- handleEvent: function BPP_handleEvent(aEvent) {
+ handleEvent: function(aEvent) {
var target = aEvent.target;
switch (aEvent.type) {
case "input":
@@ -410,7 +410,7 @@ var BookmarkPropertiesPanel = {
},
// nsISupports
- QueryInterface: function BPP_QueryInterface(aIID) {
+ QueryInterface: function(aIID) {
if (aIID.equals(Ci.nsIDOMEventListener) ||
aIID.equals(Ci.nsISupports))
return this;
@@ -418,7 +418,7 @@ var BookmarkPropertiesPanel = {
throw Cr.NS_NOINTERFACE;
},
- _element: function BPP__element(aID) {
+ _element: function(aID) {
return document.getElementById("editBMPanel_" + aID);
},
@@ -463,7 +463,7 @@ var BookmarkPropertiesPanel = {
*
* @returns true if the input is valid, false otherwise
*/
- _inputIsValid: function BPP__inputIsValid() {
+ _inputIsValid: function() {
if (this._itemType == BOOKMARK_ITEM &&
!this._containsValidURI("locationField"))
return false;
@@ -482,7 +482,7 @@ var BookmarkPropertiesPanel = {
*
* @returns true if the textbox contains a valid URI string, false otherwise
*/
- _containsValidURI: function BPP__containsValidURI(aTextboxID) {
+ _containsValidURI: function(aTextboxID) {
try {
var value = this._element(aTextboxID).value;
if (value) {
@@ -500,7 +500,7 @@ var BookmarkPropertiesPanel = {
* The container-identifier and insertion-index are returned separately in
* the form of [containerIdentifier, insertionIndex]
*/
- _getInsertionPointDetails: function BPP__getInsertionPointDetails() {
+ _getInsertionPointDetails: function() {
var containerId = this._defaultInsertionPoint.itemId;
var indexInContainer = this._defaultInsertionPoint.index;
@@ -554,7 +554,7 @@ var BookmarkPropertiesPanel = {
* Returns a childItems-transactions array representing the URIList with
* which the dialog has been opened.
*/
- _getTransactionsForURIList: function BPP__getTransactionsForURIList() {
+ _getTransactionsForURIList: function() {
var transactions = [];
for (let uri of this._URIs) {
// uri should be an object in the form { url, title }. Though add-ons
diff --git a/basilisk/components/places/content/browserPlacesViews.js b/basilisk/components/places/content/browserPlacesViews.js
index c6ee9b6..2d1a9a2 100644
--- a/basilisk/components/places/content/browserPlacesViews.js
+++ b/basilisk/components/places/content/browserPlacesViews.js
@@ -222,17 +222,17 @@ PlacesViewBase.prototype = {
index, orientation, tagName);
},
- buildContextMenu: function PVB_buildContextMenu(aPopup) {
+ buildContextMenu: function(aPopup) {
this._contextMenuShown = aPopup;
window.updateCommands("places");
return this.controller.buildContextMenu(aPopup);
},
- destroyContextMenu: function PVB_destroyContextMenu(aPopup) {
+ destroyContextMenu: function(aPopup) {
this._contextMenuShown = null;
},
- _cleanPopup: function PVB_cleanPopup(aPopup, aDelay) {
+ _cleanPopup: function(aPopup, aDelay) {
// Remove Places nodes from the popup.
let child = aPopup._startMarker;
while (child.nextSibling != aPopup._endMarker) {
@@ -255,7 +255,7 @@ PlacesViewBase.prototype = {
}
},
- _rebuildPopup: function PVB__rebuildPopup(aPopup) {
+ _rebuildPopup: function(aPopup) {
let resultNode = aPopup._placesNode;
if (!resultNode.containerOpen)
return;
@@ -284,7 +284,7 @@ PlacesViewBase.prototype = {
aPopup._built = true;
},
- _removeChild: function PVB__removeChild(aChild) {
+ _removeChild: function(aChild) {
// If document.popupNode pointed to this child, null it out,
// otherwise controller's command-updating may rely on the removed
// item still being "selected".
@@ -487,7 +487,7 @@ PlacesViewBase.prototype = {
}
},
- toggleCutNode: function PVB_toggleCutNode(aPlacesNode, aValue) {
+ toggleCutNode: function(aPlacesNode, aValue) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
// We may get the popup for menus, but we need the menu itself.
@@ -499,7 +499,7 @@ PlacesViewBase.prototype = {
elt.removeAttribute("cutting");
},
- nodeURIChanged: function PVB_nodeURIChanged(aPlacesNode, aURIString) {
+ nodeURIChanged: function(aPlacesNode, aURIString) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
// Here we need the <menu>.
@@ -509,7 +509,7 @@ PlacesViewBase.prototype = {
elt.setAttribute("scheme", PlacesUIUtils.guessUrlSchemeForUI(aURIString));
},
- nodeIconChanged: function PVB_nodeIconChanged(aPlacesNode) {
+ nodeIconChanged: function(aPlacesNode) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
// There's no UI representation for the root node, thus there's nothing to
@@ -701,7 +701,7 @@ PlacesViewBase.prototype = {
}
},
- _populateLivemarkPopup: function PVB__populateLivemarkPopup(aPopup)
+ _populateLivemarkPopup: function(aPopup)
{
this._setLivemarkSiteURIMenuItem(aPopup);
// Show the loading status only if there are no entries yet.
@@ -731,7 +731,7 @@ PlacesViewBase.prototype = {
}, Components.utils.reportError);
},
- invalidateContainer: function PVB_invalidateContainer(aPlacesNode) {
+ invalidateContainer: function(aPlacesNode) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
elt._built = false;
@@ -740,7 +740,7 @@ PlacesViewBase.prototype = {
this._rebuildPopup(elt);
},
- uninit: function PVB_uninit() {
+ uninit: function() {
if (this._result) {
this._result.removeObserver(this);
this._resultNode.containerOpen = false;
@@ -783,7 +783,7 @@ PlacesViewBase.prototype = {
* @param aPopup
* a Places popup.
*/
- _mayAddCommandsItems: function PVB__mayAddCommandsItems(aPopup) {
+ _mayAddCommandsItems: function(aPopup) {
// The command items are never added to the root popup.
if (aPopup == this._rootElt)
return;
@@ -860,7 +860,7 @@ PlacesViewBase.prototype = {
}
},
- _ensureMarkers: function PVB__ensureMarkers(aPopup) {
+ _ensureMarkers: function(aPopup) {
if (aPopup._startMarker)
return;
@@ -904,7 +904,7 @@ PlacesViewBase.prototype = {
}
},
- _onPopupShowing: function PVB__onPopupShowing(aEvent) {
+ _onPopupShowing: function(aEvent) {
// Avoid handling popupshowing of inner views.
let popup = aEvent.originalTarget;
@@ -991,7 +991,7 @@ PlacesToolbar.prototype = {
_cbEvents: ["dragstart", "dragover", "dragexit", "dragend", "drop",
"mousemove", "mouseover", "mouseout"],
- QueryInterface: function PT_QueryInterface(aIID) {
+ QueryInterface: function(aIID) {
if (aIID.equals(Ci.nsIDOMEventListener) ||
aIID.equals(Ci.nsITimerCallback))
return this;
@@ -999,7 +999,7 @@ PlacesToolbar.prototype = {
return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
},
- uninit: function PT_uninit() {
+ uninit: function() {
this._removeEventListeners(this._viewElt, this._cbEvents, false);
this._removeEventListeners(this._rootElt, ["popupshowing", "popuphidden"],
true);
@@ -1017,7 +1017,7 @@ PlacesToolbar.prototype = {
_openedMenuButton: null,
_allowPopupShowing: true,
- _rebuild: function PT__rebuild() {
+ _rebuild: function() {
// Clear out references to existing nodes, since they will be removed
// and re-added.
if (this._overFolder.elt)
@@ -1120,7 +1120,7 @@ PlacesToolbar.prototype = {
this._updateChevronPopupNodesVisibility();
},
- handleEvent: function PT_handleEvent(aEvent) {
+ handleEvent: function(aEvent) {
switch (aEvent.type) {
case "unload":
this.uninit();
@@ -1188,12 +1188,12 @@ PlacesToolbar.prototype = {
}
},
- _isOverflowStateEventRelevant: function PT_isOverflowStateEventRelevant(aEvent) {
+ _isOverflowStateEventRelevant: function(aEvent) {
// Ignore events not aimed at ourselves, as well as purely vertical ones:
return aEvent.target == aEvent.currentTarget && aEvent.detail > 0;
},
- _onOverflow: function PT_onOverflow() {
+ _onOverflow: function() {
// Attach the popup binding to the chevron popup if it has not yet
// been initialized.
if (!this._chevronPopup.hasAttribute("type")) {
@@ -1204,12 +1204,12 @@ PlacesToolbar.prototype = {
this.updateChevron();
},
- _onUnderflow: function PT_onUnderflow() {
+ _onUnderflow: function() {
this.updateChevron();
this._chevron.collapsed = true;
},
- updateChevron: function PT_updateChevron() {
+ updateChevron: function() {
// If the chevron is collapsed there's nothing to update.
if (this._chevron.collapsed)
return;
@@ -1222,7 +1222,7 @@ PlacesToolbar.prototype = {
this._updateChevronTimer = this._setTimer(100);
},
- _updateChevronTimerCallback: function PT__updateChevronTimerCallback() {
+ _updateChevronTimerCallback: function() {
let scrollRect = this._rootElt.getBoundingClientRect();
let childOverflowed = false;
for (let i = 0; i < this._rootElt.childNodes.length; i++) {
@@ -1337,7 +1337,7 @@ PlacesToolbar.prototype = {
}
},
- nodeTitleChanged: function PT_nodeTitleChanged(aPlacesNode, aNewTitle) {
+ nodeTitleChanged: function(aPlacesNode, aNewTitle) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
// There's no UI representation for the root node, thus there's
@@ -1357,7 +1357,7 @@ PlacesToolbar.prototype = {
}
},
- invalidateContainer: function PT_invalidateContainer(aPlacesNode) {
+ invalidateContainer: function(aPlacesNode) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
if (elt == this._rootElt) {
// Container is the toolbar itself.
@@ -1373,7 +1373,7 @@ PlacesToolbar.prototype = {
hoverTime: 350,
closeTimer: null },
- _clearOverFolder: function PT__clearOverFolder() {
+ _clearOverFolder: function() {
// The mouse is no longer dragging over the stored menubutton.
// Close the menubutton, clear out drag styles, and clear all
// timers for opening/closing it.
@@ -1401,7 +1401,7 @@ PlacesToolbar.prototype = {
* - beforeIndex: child index to drop before, for the drop indicator.
* - folderElt: the folder to drop into, if applicable.
*/
- _getDropPoint: function PT__getDropPoint(aEvent) {
+ _getDropPoint: function(aEvent) {
if (!PlacesUtils.nodeIsFolder(this._resultNode))
return null;
@@ -1485,13 +1485,13 @@ PlacesToolbar.prototype = {
return dropPoint;
},
- _setTimer: function PT_setTimer(aTime) {
+ _setTimer: function(aTime) {
let timer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
timer.initWithCallback(this, aTime, timer.TYPE_ONE_SHOT);
return timer;
},
- notify: function PT_notify(aTimer) {
+ notify: function(aTimer) {
if (aTimer == this._updateChevronTimer) {
this._updateChevronTimer = null;
this._updateChevronTimerCallback();
@@ -1536,18 +1536,18 @@ PlacesToolbar.prototype = {
}
},
- _onMouseOver: function PT__onMouseOver(aEvent) {
+ _onMouseOver: function(aEvent) {
let button = aEvent.target;
if (button.parentNode == this._rootElt && button._placesNode &&
PlacesUtils.nodeIsURI(button._placesNode))
window.XULBrowserWindow.setOverLink(aEvent.target._placesNode.uri, null);
},
- _onMouseOut: function PT__onMouseOut(aEvent) {
+ _onMouseOut: function(aEvent) {
window.XULBrowserWindow.setOverLink("", null);
},
- _cleanupDragDetails: function PT__cleanupDragDetails() {
+ _cleanupDragDetails: function() {
// Called on dragend and drop.
PlacesControllerDragHelper.currentDropTarget = null;
this._draggedElt = null;
@@ -1557,7 +1557,7 @@ PlacesToolbar.prototype = {
this._dropIndicator.collapsed = true;
},
- _onDragStart: function PT__onDragStart(aEvent) {
+ _onDragStart: function(aEvent) {
// Sub menus have their own d&d handlers.
let draggedElt = aEvent.target;
if (draggedElt.parentNode != this._rootElt || !draggedElt._placesNode)
@@ -1592,7 +1592,7 @@ PlacesToolbar.prototype = {
aEvent.stopPropagation();
},
- _onDragOver: function PT__onDragOver(aEvent) {
+ _onDragOver: function(aEvent) {
// Cache the dataTransfer
PlacesControllerDragHelper.currentDropTarget = aEvent.target;
let dt = aEvent.dataTransfer;
@@ -1669,7 +1669,7 @@ PlacesToolbar.prototype = {
aEvent.stopPropagation();
},
- _onDrop: function PT__onDrop(aEvent) {
+ _onDrop: function(aEvent) {
PlacesControllerDragHelper.currentDropTarget = aEvent.target;
let dropPoint = this._getDropPoint(aEvent);
@@ -1683,7 +1683,7 @@ PlacesToolbar.prototype = {
aEvent.stopPropagation();
},
- _onDragExit: function PT__onDragExit(aEvent) {
+ _onDragExit: function(aEvent) {
PlacesControllerDragHelper.currentDropTarget = null;
// Set timer to turn off indicator bar (if we turn it off
@@ -1698,11 +1698,11 @@ PlacesToolbar.prototype = {
this._overFolder.closeTimer = this._setTimer(this._overFolder.hoverTime);
},
- _onDragEnd: function PT_onDragEnd(aEvent) {
+ _onDragEnd: function(aEvent) {
this._cleanupDragDetails();
},
- _onPopupShowing: function PT__onPopupShowing(aEvent) {
+ _onPopupShowing: function(aEvent) {
if (!this._allowPopupShowing) {
this._allowPopupShowing = true;
aEvent.preventDefault();
@@ -1716,7 +1716,7 @@ PlacesToolbar.prototype = {
PlacesViewBase.prototype._onPopupShowing.apply(this, arguments);
},
- _onPopupHidden: function PT__onPopupHidden(aEvent) {
+ _onPopupHidden: function(aEvent) {
let popup = aEvent.target;
let placesNode = popup._placesNode;
// Avoid handling popuphidden of inner views
@@ -1742,7 +1742,7 @@ PlacesToolbar.prototype = {
}
},
- _onMouseMove: function PT__onMouseMove(aEvent) {
+ _onMouseMove: function(aEvent) {
// Used in dragStart to prevent dragging folders when dragging down.
this._cachedMouseMoveEvent = aEvent;
@@ -1788,18 +1788,18 @@ function PlacesMenu(aPopupShowingEvent, aPlace, aOptions) {
PlacesMenu.prototype = {
__proto__: PlacesViewBase.prototype,
- QueryInterface: function PM_QueryInterface(aIID) {
+ QueryInterface: function(aIID) {
if (aIID.equals(Ci.nsIDOMEventListener))
return this;
return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
},
- _removeChild: function PM_removeChild(aChild) {
+ _removeChild: function(aChild) {
PlacesViewBase.prototype._removeChild.apply(this, arguments);
},
- uninit: function PM_uninit() {
+ uninit: function() {
this._removeEventListeners(this._rootElt, ["popupshowing", "popuphidden"],
true);
this._removeEventListeners(window, ["unload"], false);
@@ -1807,7 +1807,7 @@ PlacesMenu.prototype = {
PlacesViewBase.prototype.uninit.apply(this, arguments);
},
- handleEvent: function PM_handleEvent(aEvent) {
+ handleEvent: function(aEvent) {
switch (aEvent.type) {
case "unload":
this.uninit();
@@ -1821,7 +1821,7 @@ PlacesMenu.prototype = {
}
},
- _onPopupHidden: function PM__onPopupHidden(aEvent) {
+ _onPopupHidden: function(aEvent) {
// Avoid handling popuphidden of inner views.
let popup = aEvent.originalTarget;
let placesNode = popup._placesNode;
@@ -1856,11 +1856,11 @@ function PlacesPanelMenuView(aPlace, aViewId, aRootId, aOptions) {
PlacesPanelMenuView.prototype = {
__proto__: PlacesViewBase.prototype,
- QueryInterface: function PAMV_QueryInterface(aIID) {
+ QueryInterface: function(aIID) {
return PlacesViewBase.prototype.QueryInterface.apply(this, arguments);
},
- uninit: function PAMV_uninit() {
+ uninit: function() {
PlacesViewBase.prototype.uninit.apply(this, arguments);
},
@@ -1969,7 +1969,7 @@ PlacesPanelMenuView.prototype = {
}
},
- nodeTitleChanged: function PAMV_nodeTitleChanged(aPlacesNode, aNewTitle) {
+ nodeTitleChanged: function(aPlacesNode, aNewTitle) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
// There's no UI representation for the root node.
@@ -1979,7 +1979,7 @@ PlacesPanelMenuView.prototype = {
PlacesViewBase.prototype.nodeTitleChanged.apply(this, arguments);
},
- invalidateContainer: function PAMV_invalidateContainer(aPlacesNode) {
+ invalidateContainer: function(aPlacesNode) {
let elt = this._getDOMNodeForPlacesNode(aPlacesNode);
if (elt != this._rootElt)
return;
diff --git a/basilisk/components/places/content/controller.js b/basilisk/components/places/content/controller.js
index 931c8fa..1ed7c77 100644
--- a/basilisk/components/places/content/controller.js
+++ b/basilisk/components/places/content/controller.js
@@ -105,15 +105,15 @@ PlacesController.prototype = {
]),
// nsIClipboardOwner
- LosingOwnership: function PC_LosingOwnership (aXferable) {
+ LosingOwnership: function(aXferable) {
this.cutNodes = [];
},
- terminate: function PC_terminate() {
+ terminate: function() {
this._releaseClipboardOwnership();
},
- supportsCommand: function PC_supportsCommand(aCommand) {
+ supportsCommand: function(aCommand) {
// Non-Places specific commands that we also support
switch (aCommand) {
case "cmd_undo":
@@ -132,7 +132,7 @@ PlacesController.prototype = {
return (aCommand.substr(0, CMD_PREFIX.length) == CMD_PREFIX);
},
- isCommandEnabled: function PC_isCommandEnabled(aCommand) {
+ isCommandEnabled: function(aCommand) {
switch (aCommand) {
case "cmd_undo":
if (!PlacesUIUtils.useAsyncTransactions)
@@ -213,7 +213,7 @@ PlacesController.prototype = {
}
},
- doCommand: function PC_doCommand(aCommand) {
+ doCommand: function(aCommand) {
switch (aCommand) {
case "cmd_undo":
if (!PlacesUIUtils.useAsyncTransactions) {
@@ -307,7 +307,7 @@ PlacesController.prototype = {
}
},
- onEvent: function PC_onEvent(eventName) { },
+ onEvent: function(eventName) { },
/**
@@ -345,7 +345,7 @@ PlacesController.prototype = {
/**
* Determines whether or not nodes can be inserted relative to the selection.
*/
- _canInsert: function PC__canInsert(isPaste) {
+ _canInsert: function(isPaste) {
var ip = this._view.insertionPoint;
return ip != null && (isPaste || ip.isTag != true);
},
@@ -358,7 +358,7 @@ PlacesController.prototype = {
* - clipboard data is of type TEXT_UNICODE and
* is a valid URI.
*/
- _isClipboardDataPasteable: function PC__isClipboardDataPasteable() {
+ _isClipboardDataPasteable: function() {
// if the clipboard contains TYPE_X_MOZ_PLACE_* data, it is definitely
// pasteable, with no need to unwrap all the nodes.
@@ -418,7 +418,7 @@ PlacesController.prototype = {
* Notes:
* 1) This can be slow, so don't call it anywhere performance critical!
*/
- _buildSelectionMetadata: function PC__buildSelectionMetadata() {
+ _buildSelectionMetadata: function() {
var metadata = [];
var nodes = this._view.selectedNodes;
@@ -501,7 +501,7 @@ PlacesController.prototype = {
* @return true if the conditions (see buildContextMenu) are satisfied
* and the item can be displayed, false otherwise.
*/
- _shouldShowMenuItem: function PC__shouldShowMenuItem(aMenuItem, aMetaData) {
+ _shouldShowMenuItem: function(aMenuItem, aMetaData) {
var selectiontype = aMenuItem.getAttribute("selectiontype");
if (!selectiontype) {
selectiontype = "single|multiple";
@@ -596,7 +596,7 @@ PlacesController.prototype = {
* The menupopup to build children into.
* @return true if at least one item is visible, false otherwise.
*/
- buildContextMenu: function PC_buildContextMenu(aPopup) {
+ buildContextMenu: function(aPopup) {
var metadata = this._buildSelectionMetadata();
var ip = this._view.insertionPoint;
var noIp = !ip || ip.isTag;
@@ -665,7 +665,7 @@ PlacesController.prototype = {
/**
* Select all links in the current view.
*/
- selectAll: function PC_selectAll() {
+ selectAll: function() {
this._view.selectAll();
},
@@ -687,7 +687,7 @@ PlacesController.prototype = {
* This method can be run on a URI parameter to ensure that it didn't
* receive a string instead of an nsIURI object.
*/
- _assertURINotString: function PC__assertURINotString(value) {
+ _assertURINotString: function(value) {
NS_ASSERT((typeof(value) == "object") && !(value instanceof String),
"This method should be passed a URI as a nsIURI object, not as a string.");
},
@@ -695,7 +695,7 @@ PlacesController.prototype = {
/**
* Reloads the selected livemark if any.
*/
- reloadSelectedLivemark: function PC_reloadSelectedLivemark() {
+ reloadSelectedLivemark: function() {
var selectedNode = this._view.selectedNode;
if (selectedNode) {
let itemId = selectedNode.itemId;
@@ -709,7 +709,7 @@ PlacesController.prototype = {
/**
* Opens the links in the selected folder, or the selected links in new tabs.
*/
- openSelectionInTabs: function PC_openLinksInTabs(aEvent) {
+ openSelectionInTabs: function(aEvent) {
var node = this._view.selectedNode;
var nodes = this._view.selectedNodes;
// In the case of no selection, open the root node:
@@ -728,7 +728,7 @@ PlacesController.prototype = {
* @param aType
* the type of the new item (bookmark/livemark/folder)
*/
- newItem: function PC_newItem(aType) {
+ newItem: function(aType) {
let ip = this._view.insertionPoint;
if (!ip)
throw Cr.NS_ERROR_NOT_AVAILABLE;
@@ -776,7 +776,7 @@ PlacesController.prototype = {
/**
* Opens a dialog for moving the selected nodes.
*/
- moveSelectedBookmarks: function PC_moveBookmarks() {
+ moveSelectedBookmarks: function() {
window.openDialog("chrome://browser/content/places/moveBookmarks.xul",
"", "chrome, modal",
this._view.selectedNodes);
@@ -806,7 +806,7 @@ PlacesController.prototype = {
* List of folders the calling function has already traversed
* @return true if the node should be skipped, false otherwise.
*/
- _shouldSkipNode: function PC_shouldSkipNode(node, pastFolders) {
+ _shouldSkipNode: function(node, pastFolders) {
/**
* Determines if a node is contained by another node within a resultset.
* @param node
@@ -842,7 +842,7 @@ PlacesController.prototype = {
* @param [optional] removedFolders
* An array of folder nodes that have already been removed.
*/
- _removeRange: function PC__removeRange(range, transactions, removedFolders) {
+ _removeRange: function(range, transactions, removedFolders) {
NS_ASSERT(transactions instanceof Array, "Must pass a transactions array");
if (!removedFolders)
removedFolders = [];
@@ -954,7 +954,7 @@ PlacesController.prototype = {
*
* @note history deletes are not undoable.
*/
- _removeRowsFromHistory: function PC__removeRowsFromHistory() {
+ _removeRowsFromHistory: function() {
let nodes = this._view.selectedNodes;
let URIs = [];
for (let i = 0; i < nodes.length; ++i) {
@@ -994,7 +994,7 @@ PlacesController.prototype = {
*
* @note history deletes are not undoable.
*/
- _removeHistoryContainer: function PC__removeHistoryContainer(aContainerNode) {
+ _removeHistoryContainer: function(aContainerNode) {
if (PlacesUtils.nodeIsHost(aContainerNode)) {
// Site container.
PlacesUtils.bhistory.removePagesFromHost(aContainerNode.title, true);
@@ -1059,7 +1059,7 @@ PlacesController.prototype = {
* @param aEvent
* The dragstart event.
*/
- setDataTransfer: function PC_setDataTransfer(aEvent) {
+ setDataTransfer: function(aEvent) {
let dt = aEvent.dataTransfer;
let result = this._view.result;
@@ -1129,14 +1129,14 @@ PlacesController.prototype = {
return action;
},
- _releaseClipboardOwnership: function PC__releaseClipboardOwnership() {
+ _releaseClipboardOwnership: function() {
if (this.cutNodes.length > 0) {
// This clears the logical clipboard, doesn't remove data.
this.clipboard.emptyClipboard(Ci.nsIClipboard.kGlobalClipboard);
}
},
- _clearClipboard: function PC__clearClipboard() {
+ _clearClipboard: function() {
let xferable = Cc["@mozilla.org/widget/transferable;1"].
createInstance(Ci.nsITransferable);
xferable.init(null);
@@ -1147,7 +1147,7 @@ PlacesController.prototype = {
this.clipboard.setData(xferable, null, Ci.nsIClipboard.kGlobalClipboard);
},
- _populateClipboard: function PC__populateClipboard(aNodes, aAction) {
+ _populateClipboard: function(aNodes, aAction) {
// This order is _important_! It controls how this and other applications
// select data to be inserted based on type.
let contents = [
@@ -1231,7 +1231,7 @@ PlacesController.prototype = {
/**
* Copy Bookmarks and Folders to the clipboard
*/
- copy: function PC_copy() {
+ copy: function() {
let result = this._view.result;
let didSuppressNotifications = result.suppressNotifications;
if (!didSuppressNotifications)
@@ -1248,7 +1248,7 @@ PlacesController.prototype = {
/**
* Cut Bookmarks and Folders to the clipboard
*/
- cut: function PC_cut() {
+ cut: function() {
let result = this._view.result;
let didSuppressNotifications = result.suppressNotifications;
if (!didSuppressNotifications)
@@ -1390,7 +1390,7 @@ PlacesController.prototype = {
* @param aLivemarkInfo
* a mozILivemarkInfo object.
*/
- cacheLivemarkInfo: function PC_cacheLivemarkInfo(aNode, aLivemarkInfo) {
+ cacheLivemarkInfo: function(aNode, aLivemarkInfo) {
this._cachedLivemarkInfoObjects.set(aNode, aLivemarkInfo);
},
@@ -1401,7 +1401,7 @@ PlacesController.prototype = {
* @return true if there's a cached mozILivemarkInfo object for
* aNode, false otherwise.
*/
- hasCachedLivemarkInfo: function PC_hasCachedLivemarkInfo(aNode) {
+ hasCachedLivemarkInfo: function(aNode) {
return this._cachedLivemarkInfoObjects.has(aNode);
},
@@ -1412,7 +1412,7 @@ PlacesController.prototype = {
* a places result node.
* @return the mozILivemarkInfo object for aNode, if set, null otherwise.
*/
- getCachedLivemarkInfo: function PC_getCachedLivemarkInfo(aNode) {
+ getCachedLivemarkInfo: function(aNode) {
return this._cachedLivemarkInfoObjects.get(aNode, null);
}
};
@@ -1438,7 +1438,7 @@ var PlacesControllerDragHelper = {
* @return true if the user is dragging over a node within the hierarchy of
* the container, false otherwise.
*/
- draggingOverChildNode: function PCDH_draggingOverChildNode(node) {
+ draggingOverChildNode: function(node) {
let currentNode = this.currentDropTarget;
while (currentNode) {
if (currentNode == node)
@@ -1451,7 +1451,7 @@ var PlacesControllerDragHelper = {
/**
* @return The current active drag session. Returns null if there is none.
*/
- getSession: function PCDH__getSession() {
+ getSession: function() {
return this.dragService.getCurrentSession();
},
@@ -1460,7 +1460,7 @@ var PlacesControllerDragHelper = {
* @param aFlavors
* The flavors list of type DOMStringList.
*/
- getFirstValidFlavor: function PCDH_getFirstValidFlavor(aFlavors) {
+ getFirstValidFlavor: function(aFlavors) {
for (let i = 0; i < aFlavors.length; i++) {
if (PlacesUIUtils.SUPPORTED_FLAVORS.includes(aFlavors[i]))
return aFlavors[i];
@@ -1482,7 +1482,7 @@ var PlacesControllerDragHelper = {
* @param ip
* The insertion point where the items should be dropped.
*/
- canDrop: function PCDH_canDrop(ip, dt) {
+ canDrop: function(ip, dt) {
let dropCount = dt.mozItemCount;
// Check every dragged item.
diff --git a/basilisk/components/places/content/editBookmarkOverlay.js b/basilisk/components/places/content/editBookmarkOverlay.js
index d59f5c7..366942d 100644
--- a/basilisk/components/places/content/editBookmarkOverlay.js
+++ b/basilisk/components/places/content/editBookmarkOverlay.js
@@ -391,7 +391,7 @@ var gEditItemOverlay = {
return folderMenuItem;
},
- _initFolderMenuList: function EIO__initFolderMenuList(aSelectedFolder) {
+ _initFolderMenuList: function(aSelectedFolder) {
// clean up first
var menupopup = this._folderMenuList.menupopup;
while (menupopup.childNodes.length > 6)
diff --git a/basilisk/components/places/content/moveBookmarks.js b/basilisk/components/places/content/moveBookmarks.js
index 5bfdce5..751fc8f 100644
--- a/basilisk/components/places/content/moveBookmarks.js
+++ b/basilisk/components/places/content/moveBookmarks.js
@@ -22,7 +22,7 @@ var gMoveBookmarksDialog = {
PlacesUIUtils.allBookmarksFolderId;
},
- onOK: function MBD_onOK(aEvent) {
+ onOK: function(aEvent) {
let selectedNode = this.foldersTree.selectedNode;
let selectedFolderId = PlacesUtils.getConcreteItemId(selectedNode);
@@ -57,7 +57,7 @@ var gMoveBookmarksDialog = {
}.bind(this)).then(null, Components.utils.reportError);
},
- newFolder: function MBD_newFolder() {
+ newFolder: function() {
// The command is disabled when the tree is not focused
this.foldersTree.focus();
goDoCommand("placesCmd_new:folder");
diff --git a/basilisk/components/places/content/places.js b/basilisk/components/places/content/places.js
index 375c3de..c0df873 100644
--- a/basilisk/components/places/content/places.js
+++ b/basilisk/components/places/content/places.js
@@ -36,7 +36,7 @@ var PlacesOrganizer = {
this._places.place = "place:excludeItems=1&expandQueries=0&folder=" + leftPaneRoot;
},
- selectLeftPaneQuery: function PO_selectLeftPaneQuery(aQueryName) {
+ selectLeftPaneQuery: function(aQueryName) {
var itemId = PlacesUIUtils.leftPaneQueries[aQueryName];
this._places.selectItems([itemId]);
// Forcefully expand all-bookmarks
@@ -87,7 +87,7 @@ var PlacesOrganizer = {
}
},
- init: function PO_init() {
+ init: function() {
ContentArea.init();
this._places = document.getElementById("placesList");
@@ -135,7 +135,7 @@ var PlacesOrganizer = {
ContentArea.focus();
},
- QueryInterface: function PO_QueryInterface(aIID) {
+ QueryInterface: function(aIID) {
if (aIID.equals(Components.interfaces.nsIDOMEventListener) ||
aIID.equals(Components.interfaces.nsISupports))
return this;
@@ -143,7 +143,7 @@ var PlacesOrganizer = {
throw Components.results.NS_NOINTERFACE;
},
- handleEvent: function PO_handleEvent(aEvent) {
+ handleEvent: function(aEvent) {
if (aEvent.type != "AppCommand")
return;
@@ -163,7 +163,7 @@ var PlacesOrganizer = {
}
},
- destroy: function PO_destroy() {
+ destroy: function() {
},
_location: null,
@@ -205,13 +205,13 @@ var PlacesOrganizer = {
_backHistory: [],
_forwardHistory: [],
- back: function PO_back() {
+ back: function() {
this._forwardHistory.unshift(this.location);
var historyEntry = this._backHistory.shift();
this._location = null;
this.location = historyEntry;
},
- forward: function PO_forward() {
+ forward: function() {
this._backHistory.unshift(this.location);
var historyEntry = this._forwardHistory.shift();
this._location = null;
@@ -229,7 +229,7 @@ var PlacesOrganizer = {
* deleting its text, this will be false.
*/
_cachedLeftPaneSelectedURI: null,
- onPlaceSelected: function PO_onPlaceSelected(resetSearchBox) {
+ onPlaceSelected: function(resetSearchBox) {
// Don't change the right-hand pane contents when there's no selection.
if (!this._places.hasSelection)
return;
@@ -275,7 +275,7 @@ var PlacesOrganizer = {
* @param aNode
* the node to set up scope from
*/
- _setSearchScopeForNode: function PO__setScopeForNode(aNode) {
+ _setSearchScopeForNode: function(aNode) {
let itemId = aNode.itemId;
if (PlacesUtils.nodeIsHistoryContainer(aNode) ||
@@ -298,7 +298,7 @@ var PlacesOrganizer = {
* @param aEvent
* The mouse event.
*/
- onPlacesListClick: function PO_onPlacesListClick(aEvent) {
+ onPlacesListClick: function(aEvent) {
// Only handle clicks on tree children.
if (aEvent.target.localName != "treechildren")
return;
@@ -318,7 +318,7 @@ var PlacesOrganizer = {
/**
* Handle focus changes on the places list and the current content view.
*/
- updateDetailsPane: function PO_updateDetailsPane() {
+ updateDetailsPane: function() {
if (!ContentArea.currentViewOptions.showDetailsPane)
return;
let view = PlacesUIUtils.getViewForNode(document.activeElement);
@@ -329,7 +329,7 @@ var PlacesOrganizer = {
}
},
- openFlatContainer: function PO_openFlatContainerFlatContainer(aContainer) {
+ openFlatContainer: function(aContainer) {
if (aContainer.itemId != -1) {
PlacesUtils.asContainer(this._places.selectedNode).containerOpen = true;
this._places.selectItems([aContainer.itemId], false);
@@ -343,7 +343,7 @@ var PlacesOrganizer = {
* Returns the options associated with the query currently loaded in the
* main places pane.
*/
- getCurrentOptions: function PO_getCurrentOptions() {
+ getCurrentOptions: function() {
return PlacesUtils.asQuery(ContentArea.currentView.result.root).queryOptions;
},
@@ -351,7 +351,7 @@ var PlacesOrganizer = {
* Returns the queries associated with the query currently loaded in the
* main places pane.
*/
- getCurrentQueries: function PO_getCurrentQueries() {
+ getCurrentQueries: function() {
return PlacesUtils.asQuery(ContentArea.currentView.result.root).getQueries();
},
@@ -359,7 +359,7 @@ var PlacesOrganizer = {
* Show the migration wizard for importing passwords,
* cookies, history, preferences, and bookmarks.
*/
- importFromBrowser: function PO_importFromBrowser() {
+ importFromBrowser: function() {
// We pass in the type of source we're using for use in telemetry:
MigrationUtils.showMigrationWizard(window, [MigrationUtils.MIGRATION_ENTRYPOINT_PLACES]);
},
@@ -367,7 +367,7 @@ var PlacesOrganizer = {
/**
* Open a file-picker and import the selected file into the bookmarks store
*/
- importFromFile: function PO_importFromFile() {
+ importFromFile: function() {
let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
let fpCallback = function fpCallback_done(aResult) {
if (aResult != Ci.nsIFilePicker.returnCancel && fp.fileURL) {
@@ -386,7 +386,7 @@ var PlacesOrganizer = {
/**
* Allows simple exporting of bookmarks.
*/
- exportBookmarks: function PO_exportBookmarks() {
+ exportBookmarks: function() {
let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker);
let fpCallback = function fpCallback_done(aResult) {
if (aResult != Ci.nsIFilePicker.returnCancel) {
@@ -406,7 +406,7 @@ var PlacesOrganizer = {
/**
* Populates the restore menu with the dates of the backups available.
*/
- populateRestoreMenu: function PO_populateRestoreMenu() {
+ populateRestoreMenu: function() {
let restorePopup = document.getElementById("fileRestorePopup");
const locale = Cc["@mozilla.org/chrome/chrome-registry;1"]
@@ -475,7 +475,7 @@ var PlacesOrganizer = {
* Called when 'Choose File...' is selected from the restore menu.
* Prompts for a file and restores bookmarks to those in the file.
*/
- onRestoreBookmarksFromFile: function PO_onRestoreBookmarksFromFile() {
+ onRestoreBookmarksFromFile: function() {
let dirSvc = Cc["@mozilla.org/file/directory_service;1"].
getService(Ci.nsIProperties);
let backupsDir = dirSvc.get("Desk", Ci.nsILocalFile);
@@ -498,7 +498,7 @@ var PlacesOrganizer = {
/**
* Restores bookmarks from a JSON file.
*/
- restoreBookmarksFromFile: function PO_restoreBookmarksFromFile(aFilePath) {
+ restoreBookmarksFromFile: function(aFilePath) {
// check file extension
if (!aFilePath.toLowerCase().endsWith("json") &&
!aFilePath.toLowerCase().endsWith("jsonlz4")) {
@@ -523,7 +523,7 @@ var PlacesOrganizer = {
});
},
- _showErrorAlert: function PO__showErrorAlert(aMsg) {
+ _showErrorAlert: function(aMsg) {
var brandShortName = document.getElementById("brandStrings").
getString("brandShortName");
@@ -537,7 +537,7 @@ var PlacesOrganizer = {
* The file is a JSON serialization of bookmarks, tags and any annotations
* of those items.
*/
- backupBookmarks: function PO_backupBookmarks() {
+ backupBookmarks: function() {
let dirSvc = Cc["@mozilla.org/file/directory_service;1"].
getService(Ci.nsIProperties);
let backupsDir = dirSvc.get("Desk", Ci.nsILocalFile);
@@ -596,7 +596,7 @@ var PlacesOrganizer = {
},
// NOT YET USED
- updateThumbnailProportions: function PO_updateThumbnailProportions() {
+ updateThumbnailProportions: function() {
var previewBox = document.getElementById("previewBox");
var canvas = document.getElementById("itemThumbnail");
var height = previewBox.boxObject.height;
@@ -605,7 +605,7 @@ var PlacesOrganizer = {
canvas.height = height;
},
- _fillDetailsPane: function PO__fillDetailsPane(aNodeList) {
+ _fillDetailsPane: function(aNodeList) {
var infoBox = document.getElementById("infoBox");
var detailsDeck = document.getElementById("detailsDeck");
@@ -697,7 +697,7 @@ var PlacesOrganizer = {
},
// NOT YET USED
- _updateThumbnail: function PO__updateThumbnail() {
+ _updateThumbnail: function() {
var bo = document.getElementById("previewBox").boxObject;
var width = bo.width;
var height = bo.height;
@@ -718,7 +718,7 @@ var PlacesOrganizer = {
ctx.restore();
},
- toggleAdditionalInfoFields: function PO_toggleAdditionalInfoFields() {
+ toggleAdditionalInfoFields: function() {
var infoBox = document.getElementById("infoBox");
var infoBoxExpander = document.getElementById("infoBoxExpander");
var infoBoxExpanderLabel = document.getElementById("infoBoxExpanderLabel");
@@ -777,7 +777,7 @@ var PlacesSearchBox = {
* @param filterString
* The text to search for.
*/
- search: function PSB_search(filterString) {
+ search: function(filterString) {
var PO = PlacesOrganizer;
// If the user empties the search box manually, reset it and load all
// contents of the current scope.
@@ -840,7 +840,7 @@ var PlacesSearchBox = {
/**
* Finds across all history, downloads or all bookmarks.
*/
- findAll: function PSB_findAll() {
+ findAll: function() {
switch (this.filterCollection) {
case "history":
PlacesQueryBuilder.setScope("history");
@@ -860,7 +860,7 @@ var PlacesSearchBox = {
* @param aTitle
* The title of the current collection.
*/
- updateCollectionTitle: function PSB_updateCollectionTitle(aTitle) {
+ updateCollectionTitle: function(aTitle) {
let title = "";
switch (this.filterCollection) {
case "history":
@@ -894,14 +894,14 @@ var PlacesSearchBox = {
/**
* Focus the search box
*/
- focus: function PSB_focus() {
+ focus: function() {
this.searchFilter.focus();
},
/**
* Set up the gray text in the search bar as the Places View loads.
*/
- init: function PSB_init() {
+ init: function() {
this.updateCollectionTitle();
},
@@ -933,7 +933,7 @@ var PlacesQueryBuilder = {
* The search scope: "bookmarks", "collection", "downloads" or
* "history".
*/
- setScope: function PQB_setScope(aScope) {
+ setScope: function(aScope) {
// Determine filterCollection, folders, and scopeButtonId based on aScope.
var filterCollection;
var folders = [];
@@ -987,7 +987,7 @@ var ViewMenu = {
* @returns The element for the caller to insert new items before,
* null if the caller should just append to the popup.
*/
- _clean: function VM__clean(popup, startID, endID) {
+ _clean: function(popup, startID, endID) {
if (endID)
NS_ASSERT(startID, "meaningless to have valid endID and null startID");
if (startID) {
@@ -1035,7 +1035,7 @@ var ViewMenu = {
* If propertyPrefix is null, the column label is used as label and
* no accesskey is assigned.
*/
- fillWithColumns: function VM_fillWithColumns(event, startID, endID, type, propertyPrefix) {
+ fillWithColumns: function(event, startID, endID, type, propertyPrefix) {
var popup = event.target;
var pivot = this._clean(popup, startID, endID);
@@ -1086,7 +1086,7 @@ var ViewMenu = {
/**
* Set up the content of the view menu.
*/
- populateSortMenu: function VM_populateSortMenu(event) {
+ populateSortMenu: function(event) {
this.fillWithColumns(event, "viewUnsorted", "directionSeparator", "radio", "view.sortBy.1.");
var sortColumn = this._getSortColumn();
@@ -1117,7 +1117,7 @@ var ViewMenu = {
* @param element
* The menuitem element for the column
*/
- showHideColumn: function VM_showHideColumn(element) {
+ showHideColumn: function(element) {
var column = element.column;
var splitter = column.nextSibling;
@@ -1140,7 +1140,7 @@ var ViewMenu = {
* Gets the last column that was sorted.
* @returns the currently sorted column, null if there is no sorted column.
*/
- _getSortColumn: function VM__getSortColumn() {
+ _getSortColumn: function() {
var content = document.getElementById("placeContent");
var cols = content.columns;
for (var i = 0; i < cols.count; ++i) {
@@ -1163,7 +1163,7 @@ var ViewMenu = {
*
* If both aColumnID and aDirection are null, the view will be unsorted.
*/
- setSortColumn: function VM_setSortColumn(aColumn, aDirection) {
+ setSortColumn: function(aColumn, aDirection) {
var result = document.getElementById("placeContent").result;
if (!aColumn && !aDirection) {
result.sortingMode = Ci.nsINavHistoryQueryOptions.SORT_BY_NONE;
@@ -1222,7 +1222,7 @@ var ViewMenu = {
var ContentArea = {
_specialViews: new Map(),
- init: function CA_init() {
+ init: function() {
this._deck = document.getElementById("placesViewsDeck");
this._toolbar = document.getElementById("placesToolbar");
ContentTree.init();
@@ -1313,7 +1313,7 @@ var ContentArea = {
/**
* Applies view options.
*/
- _setupView: function CA__setupView() {
+ _setupView: function() {
let options = this.currentViewOptions;
// showDetailsPane.
@@ -1357,7 +1357,7 @@ var ContentArea = {
};
var ContentTree = {
- init: function CT_init() {
+ init: function() {
this._view = document.getElementById("placeContent");
},
@@ -1372,12 +1372,12 @@ var ContentTree = {
});
},
- openSelectedNode: function CT_openSelectedNode(aEvent) {
+ openSelectedNode: function(aEvent) {
let view = this.view;
PlacesUIUtils.openNodeWithEvent(view.selectedNode, aEvent, view);
},
- onClick: function CT_onClick(aEvent) {
+ onClick: function(aEvent) {
let node = this.view.selectedNode;
if (node) {
let doubleClick = aEvent.button == 0 && aEvent.detail == 2;
@@ -1395,7 +1395,7 @@ var ContentTree = {
}
},
- onKeyPress: function CT_onKeyPress(aEvent) {
+ onKeyPress: function(aEvent) {
if (aEvent.keyCode == KeyEvent.DOM_VK_RETURN)
this.openSelectedNode(aEvent);
}
diff --git a/basilisk/components/places/content/sidebarUtils.js b/basilisk/components/places/content/sidebarUtils.js
index 96c2897..96e91bb 100644
--- a/basilisk/components/places/content/sidebarUtils.js
+++ b/basilisk/components/places/content/sidebarUtils.js
@@ -5,7 +5,7 @@
Components.utils.import("resource://gre/modules/AppConstants.jsm");
var SidebarUtils = {
- handleTreeClick: function SU_handleTreeClick(aTree, aEvent, aGutterSelect) {
+ handleTreeClick: function(aTree, aEvent, aGutterSelect) {
// right-clicks are not handled here
if (aEvent.button == 2)
return;
@@ -59,7 +59,7 @@ var SidebarUtils = {
}
},
- handleTreeKeyPress: function SU_handleTreeKeyPress(aEvent) {
+ handleTreeKeyPress: function(aEvent) {
// XXX Bug 627901: Post Fx4, this method should take a tree parameter.
let tree = aEvent.target;
let node = tree.selectedNode;
@@ -73,7 +73,7 @@ var SidebarUtils = {
* The following function displays the URL of a node that is being
* hovered over.
*/
- handleTreeMouseMove: function SU_handleTreeMouseMove(aEvent) {
+ handleTreeMouseMove: function(aEvent) {
if (aEvent.target.localName != "treechildren")
return;
@@ -95,7 +95,7 @@ var SidebarUtils = {
this.setMouseoverURL("");
},
- setMouseoverURL: function SU_setMouseoverURL(aURL) {
+ setMouseoverURL: function(aURL) {
// When the browser window is closed with an open sidebar, the sidebar
// unload event happens after the browser's one. In this case
// top.XULBrowserWindow has been nullified already.
diff --git a/basilisk/components/places/content/treeView.js b/basilisk/components/places/content/treeView.js
index 181bb54..810c4ab 100644
--- a/basilisk/components/places/content/treeView.js
+++ b/basilisk/components/places/content/treeView.js
@@ -48,7 +48,7 @@ PlacesTreeView.prototype = {
/**
* This is called once both the result and the tree are set.
*/
- _finishInit: function PTV__finishInit() {
+ _finishInit: function() {
let selection = this.selection;
if (selection)
selection.selectEventsSuppressed = true;
@@ -89,7 +89,7 @@ PlacesTreeView.prototype = {
*
* @return true if aContainer is a plain container, false otherwise.
*/
- _isPlainContainer: function PTV__isPlainContainer(aContainer) {
+ _isPlainContainer: function(aContainer) {
// Livemarks are always plain containers.
if (this._controller.hasCachedLivemarkInfo(aContainer))
return true;
@@ -204,7 +204,7 @@ PlacesTreeView.prototype = {
* Row number.
* @return [parentNode, parentRow]
*/
- _getParentByChildRow: function PTV__getParentByChildRow(aChildRow) {
+ _getParentByChildRow: function(aChildRow) {
let node = this._getNodeForRow(aChildRow);
let parent = (node === null) ? this._rootNode : node.parent;
@@ -219,7 +219,7 @@ PlacesTreeView.prototype = {
/**
* Gets the node at a given row.
*/
- _getNodeForRow: function PTV__getNodeForRow(aRow) {
+ _getNodeForRow: function(aRow) {
if (aRow < 0) {
return null;
}
@@ -481,7 +481,7 @@ PlacesTreeView.prototype = {
this._tree.ensureRowIsVisible(scrollToRow);
},
- _convertPRTimeToString: function PTV__convertPRTimeToString(aTime) {
+ _convertPRTimeToString: function(aTime) {
const MS_PER_MINUTE = 60000;
const MS_PER_DAY = 86400000;
let timeMs = aTime / 1000; // PRTime is in microseconds
@@ -537,7 +537,7 @@ PlacesTreeView.prototype = {
COLUMN_TYPE_LASTMODIFIED: 7,
COLUMN_TYPE_TAGS: 8,
- _getColumnType: function PTV__getColumnType(aColumn) {
+ _getColumnType: function(aColumn) {
let columnType = aColumn.element.getAttribute("anonid") || aColumn.id;
switch (columnType) {
@@ -561,7 +561,7 @@ PlacesTreeView.prototype = {
return this.COLUMN_TYPE_UNKNOWN;
},
- _sortTypeToColumnType: function PTV__sortTypeToColumnType(aSortType) {
+ _sortTypeToColumnType: function(aSortType) {
switch (aSortType) {
case Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING:
return [this.COLUMN_TYPE_TITLE, false];
@@ -603,7 +603,7 @@ PlacesTreeView.prototype = {
},
// nsINavHistoryResultObserver
- nodeInserted: function PTV_nodeInserted(aParentNode, aNode, aNewIndex) {
+ nodeInserted: function(aParentNode, aNode, aNewIndex) {
NS_ASSERT(this._result, "Got a notification but have no result!");
if (!this._tree || !this._result)
return;
@@ -677,7 +677,7 @@ PlacesTreeView.prototype = {
* However, we won't do this when sorted by date because dates will never
* change for visits, and date sorting is the only time things are collapsed.
*/
- nodeRemoved: function PTV_nodeRemoved(aParentNode, aNode, aOldIndex) {
+ nodeRemoved: function(aParentNode, aNode, aOldIndex) {
NS_ASSERT(this._result, "Got a notification but have no result!");
if (!this._tree || !this._result)
return;
@@ -776,7 +776,7 @@ PlacesTreeView.prototype = {
}
},
- _invalidateCellValue: function PTV__invalidateCellValue(aNode,
+ _invalidateCellValue: function(aNode,
aColumnType) {
NS_ASSERT(this._result, "Got a notification but have no result!");
if (!this._tree || !this._result)
@@ -803,7 +803,7 @@ PlacesTreeView.prototype = {
}
},
- _populateLivemarkContainer: function PTV__populateLivemarkContainer(aNode) {
+ _populateLivemarkContainer: function(aNode) {
PlacesUtils.livemarks.getLivemark({ id: aNode.itemId })
.then(aLivemark => {
let placesNode = aNode;
@@ -819,20 +819,20 @@ PlacesTreeView.prototype = {
}, Components.utils.reportError);
},
- nodeTitleChanged: function PTV_nodeTitleChanged(aNode, aNewTitle) {
+ nodeTitleChanged: function(aNode, aNewTitle) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
},
- nodeURIChanged: function PTV_nodeURIChanged(aNode, aNewURI) {
+ nodeURIChanged: function(aNode, aNewURI) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_URI);
},
- nodeIconChanged: function PTV_nodeIconChanged(aNode) {
+ nodeIconChanged: function(aNode) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_TITLE);
},
nodeHistoryDetailsChanged:
- function PTV_nodeHistoryDetailsChanged(aNode, aUpdatedVisitDate,
+ function(aNode, aUpdatedVisitDate,
aUpdatedVisitCount) {
if (aNode.parent && this._controller.hasCachedLivemarkInfo(aNode.parent)) {
// Find the node in the parent.
@@ -852,13 +852,13 @@ PlacesTreeView.prototype = {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_VISITCOUNT);
},
- nodeTagsChanged: function PTV_nodeTagsChanged(aNode) {
+ nodeTagsChanged: function(aNode) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_TAGS);
},
nodeKeywordChanged(aNode, aNewKeyword) {},
- nodeAnnotationChanged: function PTV_nodeAnnotationChanged(aNode, aAnno) {
+ nodeAnnotationChanged: function(aNode, aAnno) {
if (aAnno == PlacesUIUtils.DESCRIPTION_ANNO) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_DESCRIPTION);
}
@@ -874,17 +874,17 @@ PlacesTreeView.prototype = {
}
},
- nodeDateAddedChanged: function PTV_nodeDateAddedChanged(aNode, aNewValue) {
+ nodeDateAddedChanged: function(aNode, aNewValue) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_DATEADDED);
},
nodeLastModifiedChanged:
- function PTV_nodeLastModifiedChanged(aNode, aNewValue) {
+ function(aNode, aNewValue) {
this._invalidateCellValue(aNode, this.COLUMN_TYPE_LASTMODIFIED);
},
containerStateChanged:
- function PTV_containerStateChanged(aNode, aOldState, aNewState) {
+ function(aNode, aOldState, aNewState) {
this.invalidateContainer(aNode);
if (PlacesUtils.nodeIsFolder(aNode) ||
@@ -915,7 +915,7 @@ PlacesTreeView.prototype = {
}
},
- invalidateContainer: function PTV_invalidateContainer(aContainer) {
+ invalidateContainer: function(aContainer) {
NS_ASSERT(this._result, "Need to have a result to update");
if (!this._tree)
return;
@@ -1021,7 +1021,7 @@ PlacesTreeView.prototype = {
},
_columns: [],
- _findColumnByType: function PTV__findColumnByType(aColumnType) {
+ _findColumnByType: function(aColumnType) {
if (this._columns[aColumnType])
return this._columns[aColumnType];
@@ -1040,7 +1040,7 @@ PlacesTreeView.prototype = {
return null;
},
- sortingChanged: function PTV__sortingChanged(aSortingMode) {
+ sortingChanged: function(aSortingMode) {
if (!this._tree || !this._result)
return;
@@ -1068,7 +1068,7 @@ PlacesTreeView.prototype = {
},
_inBatchMode: false,
- batching: function PTV__batching(aToggleMode) {
+ batching: function(aToggleMode) {
if (this._inBatchMode != aToggleMode) {
this._inBatchMode = this.selection.selectEventsSuppressed = aToggleMode;
if (this._inBatchMode) {
@@ -1109,14 +1109,14 @@ PlacesTreeView.prototype = {
return val;
},
- nodeForTreeIndex: function PTV_nodeForTreeIndex(aIndex) {
+ nodeForTreeIndex: function(aIndex) {
if (aIndex > this._rows.length)
throw Cr.NS_ERROR_INVALID_ARG;
return this._getNodeForRow(aIndex);
},
- treeIndexForNode: function PTV_treeNodeForIndex(aNode) {
+ treeIndexForNode: function(aNode) {
// The API allows passing invisible nodes.
try {
return this._getRowForNode(aNode, true);
@@ -1140,7 +1140,7 @@ PlacesTreeView.prototype = {
getRowProperties: function() { return ""; },
getCellProperties:
- function PTV_getCellProperties(aRow, aColumn) {
+ function(aRow, aColumn) {
// for anonid-trees, we need to add the column-type manually
var props = "";
let columnType = aColumn.element.getAttribute("anonid");
@@ -1221,7 +1221,7 @@ PlacesTreeView.prototype = {
getColumnProperties: function(aColumn) { return ""; },
- isContainer: function PTV_isContainer(aRow) {
+ isContainer: function(aRow) {
// Only leaf nodes aren't listed in the rows array.
let node = this._rows[aRow];
if (node === undefined)
@@ -1246,7 +1246,7 @@ PlacesTreeView.prototype = {
return false;
},
- isContainerOpen: function PTV_isContainerOpen(aRow) {
+ isContainerOpen: function(aRow) {
if (this._flatList)
return false;
@@ -1254,7 +1254,7 @@ PlacesTreeView.prototype = {
return this._rows[aRow].containerOpen;
},
- isContainerEmpty: function PTV_isContainerEmpty(aRow) {
+ isContainerEmpty: function(aRow) {
if (this._flatList)
return true;
@@ -1268,18 +1268,18 @@ PlacesTreeView.prototype = {
return !node.hasChildren;
},
- isSeparator: function PTV_isSeparator(aRow) {
+ isSeparator: function(aRow) {
// All separators are listed in the rows array.
let node = this._rows[aRow];
return node && PlacesUtils.nodeIsSeparator(node);
},
- isSorted: function PTV_isSorted() {
+ isSorted: function() {
return this._result.sortingMode !=
Ci.nsINavHistoryQueryOptions.SORT_BY_NONE;
},
- canDrop: function PTV_canDrop(aRow, aOrientation, aDataTransfer) {
+ canDrop: function(aRow, aOrientation, aDataTransfer) {
if (!this._result)
throw Cr.NS_ERROR_UNEXPECTED;
@@ -1291,7 +1291,7 @@ PlacesTreeView.prototype = {
return ip && PlacesControllerDragHelper.canDrop(ip, aDataTransfer);
},
- _getInsertionPoint: function PTV__getInsertionPoint(index, orientation) {
+ _getInsertionPoint: function(index, orientation) {
let container = this._result.root;
let dropNearItemId = -1;
// When there's no selection, assume the container is the container
@@ -1370,7 +1370,7 @@ PlacesTreeView.prototype = {
dropNearItemId);
},
- drop: function PTV_drop(aRow, aOrientation, aDataTransfer) {
+ drop: function(aRow, aOrientation, aDataTransfer) {
// We are responsible for translating the |index| and |orientation|
// parameters into a container id and index within the container,
// since this information is specific to the tree view.
@@ -1383,12 +1383,12 @@ PlacesTreeView.prototype = {
PlacesControllerDragHelper.currentDropTarget = null;
},
- getParentIndex: function PTV_getParentIndex(aRow) {
+ getParentIndex: function(aRow) {
let [, parentRow] = this._getParentByChildRow(aRow);
return parentRow;
},
- hasNextSibling: function PTV_hasNextSibling(aRow, aAfterIndex) {
+ hasNextSibling: function(aRow, aAfterIndex) {
if (aRow == this._rows.length - 1) {
// The last row has no sibling.
return false;
@@ -1420,7 +1420,7 @@ PlacesTreeView.prototype = {
return this._getNodeForRow(aRow).indentLevel;
},
- getImageSrc: function PTV_getImageSrc(aRow, aColumn) {
+ getImageSrc: function(aRow, aColumn) {
// Only the title column has an image.
if (this._getColumnType(aColumn) != this.COLUMN_TYPE_TITLE)
return "";
@@ -1432,7 +1432,7 @@ PlacesTreeView.prototype = {
getProgressMode: function(aRow, aColumn) { },
getCellValue: function(aRow, aColumn) { },
- getCellText: function PTV_getCellText(aRow, aColumn) {
+ getCellText: function(aRow, aColumn) {
let node = this._getNodeForRow(aRow);
switch (this._getColumnType(aColumn)) {
case this.COLUMN_TYPE_TITLE:
@@ -1484,7 +1484,7 @@ PlacesTreeView.prototype = {
return "";
},
- setTree: function PTV_setTree(aTree) {
+ setTree: function(aTree) {
// If we are replacing the tree during a batch, there is a concrete risk
// that the treeView goes out of sync, thus it's safer to end the batch now.
// This is a no-op if we are not batching.
@@ -1507,7 +1507,7 @@ PlacesTreeView.prototype = {
}
},
- toggleOpenState: function PTV_toggleOpenState(aRow) {
+ toggleOpenState: function(aRow) {
if (!this._result)
throw Cr.NS_ERROR_UNEXPECTED;
@@ -1535,7 +1535,7 @@ PlacesTreeView.prototype = {
node.containerOpen = !node.containerOpen;
},
- cycleHeader: function PTV_cycleHeader(aColumn) {
+ cycleHeader: function(aColumn) {
if (!this._result)
throw Cr.NS_ERROR_UNEXPECTED;
@@ -1650,7 +1650,7 @@ PlacesTreeView.prototype = {
this._result.sortingMode = newSort;
},
- isEditable: function PTV_isEditable(aRow, aColumn) {
+ isEditable: function(aRow, aColumn) {
// At this point we only support editing the title field.
if (aColumn.index != 0)
return false;
@@ -1693,7 +1693,7 @@ PlacesTreeView.prototype = {
return true;
},
- setCellText: function PTV_setCellText(aRow, aColumn, aText) {
+ setCellText: function(aRow, aColumn, aText) {
// We may only get here if the cell is editable.
let node = this._rows[aRow];
if (node.title != aText) {
@@ -1707,7 +1707,7 @@ PlacesTreeView.prototype = {
}
},
- toggleCutNode: function PTV_toggleCutNode(aNode, aValue) {
+ toggleCutNode: function(aNode, aValue) {
let currentVal = this._cuttingNodes.has(aNode);
if (currentVal != aValue) {
if (aValue)