Bug 1330111 - Expose nsFormFillController's showPopup via nsIFormFillController. r=felipe
☠☠ backed out by 955dd973d5b7 ☠ ☠
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Fri, 03 Feb 2017 12:44:49 -0800
changeset 340967 09c59f5c572a9c595abb55da30c8ceba488bc4f5
parent 340966 e208e0b5134904b69f24b0ab58edc0802bc59bae
child 340968 23180cae4a46af87493a2b84ee7d1d749237e945
push id86611
push usermozilla@noorenberghe.ca
push dateTue, 07 Feb 2017 00:51:11 +0000
treeherdermozilla-inbound@e87c86970a29 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfelipe
bugs1330111
milestone54.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 1330111 - Expose nsFormFillController's showPopup via nsIFormFillController. r=felipe MozReview-Commit-ID: 9pc2QDDWTrQ
toolkit/components/satchel/nsFormFillController.cpp
toolkit/components/satchel/nsFormFillController.h
toolkit/components/satchel/nsIFormFillController.idl
--- a/toolkit/components/satchel/nsFormFillController.cpp
+++ b/toolkit/components/satchel/nsFormFillController.cpp
@@ -1163,17 +1163,17 @@ nsFormFillController::MouseDown(nsIDOMEv
   int16_t button;
   mouseEvent->GetButton(&button);
   if (button != 0)
     return NS_OK;
 
   return ShowPopup();
 }
 
-nsresult
+NS_IMETHODIMP
 nsFormFillController::ShowPopup()
 {
   bool isOpen = false;
   GetPopupOpen(&isOpen);
   if (isOpen) {
     return SetPopupOpen(false);
   }
 
--- a/toolkit/components/satchel/nsFormFillController.h
+++ b/toolkit/components/satchel/nsFormFillController.h
@@ -72,17 +72,16 @@ protected:
    */
   void MaybeStartControllingInput(nsIDOMHTMLInputElement* aElement);
 
   nsresult PerformInputListAutoComplete(const nsAString& aSearch,
                                         nsIAutoCompleteResult** aResult);
 
   void RevalidateDataList();
   bool RowMatch(nsFormHistory *aHistory, uint32_t aIndex, const nsAString &aInputName, const nsAString &aInputValue);
-  nsresult ShowPopup();
 
   inline nsIDocShell *GetDocShellForInput(nsIDOMHTMLInputElement *aInput);
   inline nsPIDOMWindowOuter *GetWindowForDocShell(nsIDocShell *aDocShell);
   inline int32_t GetIndexOfDocShell(nsIDocShell *aDocShell);
 
   void MaybeRemoveMutationObserver(nsINode* aNode);
 
   void RemoveForDocument(nsIDocument* aDoc);
--- a/toolkit/components/satchel/nsIFormFillController.idl
+++ b/toolkit/components/satchel/nsIFormFillController.idl
@@ -51,9 +51,14 @@ interface nsIFormFillController : nsISup
 
   /*
    * Mark the specified <input> element as being managed by a form autofill component.
    * Autocomplete requests will be handed off to the autofill component.
    *
    * @param aInput - The HTML <input> element to mark
    */
   void markAsAutofillField(in nsIDOMHTMLInputElement aInput);
+
+  /*
+   * Open the autocomplete popup, if possible.
+   */
+  void showPopup();
 };