Bug 1272172 - Back out bug 1183037 for regressions. r=backout
authorBlake Kaplan <mrbkap@gmail.com>
Thu, 12 May 2016 15:48:59 -0700
changeset 297276 056a30ed79d6be6959d74cd623d486c00daccf3a
parent 297275 2004a138081c3c47180ab36623ed2d97ddefdced
child 297277 7dd02104f1ed3b5d220f005017b849e260280415
push id30253
push usercbook@mozilla.com
push dateFri, 13 May 2016 09:59:43 +0000
treeherdermozilla-central@5a2deb5a9b09 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbackout
bugs1272172, 1183037
milestone49.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 1272172 - Back out bug 1183037 for regressions. r=backout
toolkit/content/browser-child.js
--- a/toolkit/content/browser-child.js
+++ b/toolkit/content/browser-child.js
@@ -549,17 +549,16 @@ var AutoCompletePopup = {
   init: function() {
     // Hook up the form fill autocomplete controller.
     let controller = Cc["@mozilla.org/satchel/form-fill-controller;1"]
                        .getService(Ci.nsIFormFillController);
 
     controller.attachToBrowser(docShell, this.QueryInterface(Ci.nsIAutoCompletePopup));
 
     this._input = null;
-    this._element = null;
     this._popupOpen = false;
 
     addMessageListener("FormAutoComplete:HandleEnter", message => {
       this.selectedIndex = message.data.selectedIndex;
 
       let controller = Components.classes["@mozilla.org/autocomplete/controller;1"].
                   getService(Components.interfaces.nsIAutoCompleteController);
       controller.handleEnter(message.data.isPopupSelection);
@@ -588,64 +587,41 @@ var AutoCompletePopup = {
     // selectedIndex is trivial to catch (e.g. moving the mouse over the
     // list).
     return sendSyncMessage("FormAutoComplete:GetSelectedIndex", {});
   },
   get popupOpen () {
     return this._popupOpen;
   },
 
-  _attachClickListener(element) {
-    element.addEventListener("click", this);
-  },
-
-  _detachClickListener(element) {
-    element.removeEventListener("click", this);
-  },
-
   openAutocompletePopup: function (input, element) {
     if (!this._popupOpen) {
       // The search itself normally opens the popup itself, but in some cases,
       // nsAutoCompleteController tries to use cached results so notify our
       // popup to reuse the last results.
       sendAsyncMessage("FormAutoComplete:MaybeOpenPopup", {});
     }
-    if (this._element !== element) {
-      if (this._element) {
-        this._detachClickListener(this._element);
-      }
-      this._attachClickListener(element);
-    }
     this._input = input;
-    this._element = element;
     this._popupOpen = true;
   },
 
   closePopup: function () {
     this._popupOpen = false;
-    if (this._element) {
-      this._detachClickListener(this._element);
-      this._element = null;
-    }
     sendAsyncMessage("FormAutoComplete:ClosePopup", {});
   },
 
   invalidate: function () {
   },
 
   selectBy: function(reverse, page) {
     this._index = sendSyncMessage("FormAutoComplete:SelectBy", {
       reverse: reverse,
       page: page
     });
-  },
-
-  handleEvent(event) {
-    this._popupOpen = false;
-  },
+  }
 }
 
 addMessageListener("InPermitUnload", msg => {
   let inPermitUnload = docShell.contentViewer && docShell.contentViewer.inPermitUnload;
   sendAsyncMessage("InPermitUnload", {id: msg.data.id, inPermitUnload});
 });
 
 addMessageListener("PermitUnload", msg => {