Bug 1574819 - Bookmarks Menu Button popup doesn't auto-open on drag enter r=mak
authorAlexander Surkov <surkov.alexander@gmail.com>
Thu, 29 Aug 2019 13:15:51 +0000
changeset 554407 32bc8be194acef156fa4ef70ee9a7aa5c826e15b
parent 554406 6b78b362900bc8e0a5f4289cae027f4d8a47f0b5
child 554408 716ad5a4347ec6ee6cdcc7d16b95da5e4ad7e8d2
push id2165
push userffxbld-merge
push dateMon, 14 Oct 2019 16:30:58 +0000
treeherdermozilla-release@0eae18af659f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmak
bugs1574819
milestone70.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1574819 - Bookmarks Menu Button popup doesn't auto-open on drag enter r=mak Differential Revision: https://phabricator.services.mozilla.com/D43801
browser/base/content/browser-places.js
browser/components/places/PlacesUIUtils.jsm
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -969,17 +969,17 @@ var PlacesMenuDNDHandler = {
     // we should ensure that we do not close:
     if (this._closeTimer && this._closingTimerNode === event.currentTarget) {
       this._closeTimer.cancel();
       this._closingTimerNode = null;
       this._closeTimer = null;
     }
 
     PlacesControllerDragHelper.currentDropTarget = event.target;
-    let popup = event.target.lastChild;
+    let popup = event.target.menupopup;
     if (
       this._loadTimer ||
       popup.state === "showing" ||
       popup.state === "open"
     ) {
       return;
     }
 
@@ -1011,17 +1011,17 @@ var PlacesMenuDNDHandler = {
     }
 
     // Closing menus in a Places popup is handled by the view itself.
     if (!this._isStaticContainer(event.target)) {
       return;
     }
 
     PlacesControllerDragHelper.currentDropTarget = null;
-    let popup = event.target.lastChild;
+    let popup = event.target.menupopup;
 
     if (this._loadTimer) {
       this._loadTimer.cancel();
       this._loadTimer = null;
     }
     this._closeTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer);
     this._closingTimerNode = event.currentTarget;
     this._closeTimer.initWithCallback(
@@ -1051,18 +1051,18 @@ var PlacesMenuDNDHandler = {
    */
   _isStaticContainer: function PMDH__isContainer(node) {
     let isMenu =
       node.localName == "menu" ||
       (node.localName == "toolbarbutton" &&
         node.getAttribute("type") == "menu");
     let isStatic =
       !("_placesNode" in node) &&
-      node.lastChild &&
-      node.lastChild.hasAttribute("placespopup") &&
+      node.menupopup &&
+      node.menupopup.hasAttribute("placespopup") &&
       !node.parentNode.hasAttribute("placespopup");
     return isMenu && isStatic;
   },
 
   /**
    * Called when the user drags over the <menu> element.
    * @param   event
    *          The DragOver event.
--- a/browser/components/places/PlacesUIUtils.jsm
+++ b/browser/components/places/PlacesUIUtils.jsm
@@ -386,19 +386,19 @@ var PlacesUIUtils = {
       return node._placesView;
     }
 
     // The view for a <menu> of which its associated menupopup is a places
     // view, is the menupopup.
     if (
       node.localName == "menu" &&
       !node._placesNode &&
-      node.lastChild._placesView
+      node.menupopup._placesView
     ) {
-      return node.lastChild._placesView;
+      return node.menupopup._placesView;
     }
 
     while (Element.isInstance(node)) {
       if (node._placesView) {
         return node._placesView;
       }
       if (
         node.localName == "tree" &&