Bug 1304634 - Part 3: Ensure the profile search is registed while search started, r=MattN

MozReview-Commit-ID: 20jCHDM39SH
This commit is contained in:
Steve Chung
2016-12-22 12:07:02 +08:00
parent 408607f43c
commit 2230ea08f1

View File

@@ -525,6 +525,14 @@ nsFormFillController::GetSearchCount(uint32_t *aSearchCount)
NS_IMETHODIMP
nsFormFillController::GetSearchAt(uint32_t index, nsACString & _retval)
{
if (mAutofillInputs.Get(mFocusedInputNode)) {
nsCOMPtr<nsIAutoCompleteSearch> profileSearch = do_GetService("@mozilla.org/autocomplete/search;1?name=autofill-profiles");
if (profileSearch) {
_retval.AssignLiteral("autofill-profiles");
return NS_OK;
}
}
_retval.AssignLiteral("form-history");
return NS_OK;
}