Bug 1456589 - Part 7 Port Bug 1442945 1440644 1443189 1444599 to SeaMonkey places. r=IanN a=IanN
authorFrank-Rainer Grahl <frgrahl@gmx.net>
Mon, 23 Jul 2018 22:23:39 +0200
changeset 31699 3e3d8a6a9dde3d55778cc239df43502d1da318c0
parent 31698 a52ac7dae4b7aeafc46ee3cadf67a4741079efe5
child 31700 2d8a9e813140d53642a332f7b3e28ceccbb993f2
push id32
push userfrgrahl@gmx.net
push dateMon, 23 Jul 2018 20:27:15 +0000
treeherdercomm-esr60@905d670c44de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersIanN, IanN
bugs1456589, 1442945, 1440644, 1443189, 1444599
Bug 1456589 - Part 7 Port Bug 1442945 1440644 1443189 1444599 to SeaMonkey places. r=IanN a=IanN Port Bug 1442945 [Fix DND in Places menus]. Port Bug 1440644 [Fix a typo preventing the bookmark dialog storing a keyword]. Port Bug 1443189 [Places subviews are not updated while they are open]. Port Bug 1444599 [Fix opening bookmark folders from the sidebar by middle/ctrl/cmd clicking].
suite/components/places/content/browserPlacesViews.js
suite/components/places/content/editBookmarkOverlay.js
suite/components/places/content/menu.xml
suite/components/places/content/sidebarUtils.js
--- a/suite/components/places/content/browserPlacesViews.js
+++ b/suite/components/places/content/browserPlacesViews.js
@@ -2241,16 +2241,20 @@ this.PlacesPanelview = class extends Pla
     } else {
       panelview.removeAttribute("emptyplacesresult");
       try {
         panelview.removeChild(panelview._emptyMenuitem);
       } catch (ex) {}
     }
   }
 
+  _isPopupOpen() {
+    return PanelView.forNode(this._viewElt).active;
+  }
+
   _onPopupHidden(event) {
     let panelview = event.originalTarget;
     let placesNode = panelview._placesNode;
     // Avoid handling ViewHiding of inner views
     if (placesNode && PlacesUIUtils.getViewForNode(panelview) == this) {
       // UI performance: folder queries are cheap, keep the resultnode open
       // so we don't rebuild its contents whenever the popup is reopened.
       // Though, we want to always close feed containers so their expiration
--- a/suite/components/places/content/editBookmarkOverlay.js
+++ b/suite/components/places/content/editBookmarkOverlay.js
@@ -1070,17 +1070,17 @@ var gEditItemOverlay = {
     }
 
     if (!this._paneInfo.isItem || this._paneInfo.itemId != aItemId) {
       return;
     }
 
     switch (aProperty) {
     case "uri":
-      let newURI = Services.ui.newURI(aValue);
+      let newURI = Services.io.newURI(aValue);
       if (!newURI.equals(this._paneInfo.uri)) {
         this._paneInfo.uri = newURI;
         if (this._paneInfo.visibleRows.has("locationRow"))
           this._initLocationField();
 
         if (this._paneInfo.visibleRows.has("tagsRow")) {
           delete this._paneInfo._cachedCommonTags;
           this._onTagsChange(aGuid, newURI).catch(Cu.reportError);
--- a/suite/components/places/content/menu.xml
+++ b/suite/components/places/content/menu.xml
@@ -64,17 +64,17 @@
            dragging over this popup insertion point -->
       <method name="_getDropPoint">
         <parameter name="aEvent"/>
           <body><![CDATA[
             // Can't drop if the menu isn't a folder
             let resultNode = this._placesNode;
 
             if (!PlacesUtils.nodeIsFolder(resultNode) ||
-                PlacesControllerDragHelper.disallowInsertion(resultNode, this._rootView)) {
+                this._rootView.controller.disallowInsertion(resultNode)) {
               return null;
             }
 
             var dropPoint = { ip: null, folderElt: null };
 
             // The element we are dragging over
             let elt = aEvent.target;
             if (elt.localName == "menupopup")
--- a/suite/components/places/content/sidebarUtils.js
+++ b/suite/components/places/content/sidebarUtils.js
@@ -38,17 +38,17 @@ var SidebarUtils = {
 
     var metaKey = AppConstants.platform === "macosx" ? aEvent.metaKey
                                                      : aEvent.ctrlKey;
     var modifKey = metaKey || aEvent.shiftKey;
     var isContainer = tbo.view.isContainer(cell.row);
     var openInTabs = isContainer &&
                      (aEvent.button == 1 ||
                       (aEvent.button == 0 && modifKey)) &&
-                     PlacesUtils.hasChildURIs(tbo.view.nodeForTreeIndex(cell.row));
+                     PlacesUtils.hasChildURIs(aTree.view.nodeForTreeIndex(cell.row));
 
     if (aEvent.button == 0 && isContainer && !openInTabs) {
       tbo.view.toggleOpenState(cell.row);
     } else if (!mouseInGutter && openInTabs &&
             aEvent.originalTarget.localName == "treechildren") {
       tbo.view.selection.select(cell.row);
       PlacesUIUtils.openContainerNodeInTabs(aTree.selectedNode, aEvent, aTree);
     } else if (!mouseInGutter && !isContainer &&