зеркало из https://github.com/mozilla/gecko-dev.git
165955 - landing satchel
This commit is contained in:
Родитель
525c6c51ea
Коммит
d0bf2af216
|
@ -74,8 +74,11 @@ interface nsIAutoCompleteController : nsISupports
|
|||
|
||||
/*
|
||||
* Begin conducting autocomplete behavior on a given input object
|
||||
*
|
||||
* @param input - the input object to coordinate searching with
|
||||
* @param searchString - an optional default string to search for immediately
|
||||
*/
|
||||
void attachToInput(in nsIAutoCompleteInput input);
|
||||
void attachToInput(in nsIAutoCompleteInput input, in AString searchString);
|
||||
|
||||
/*
|
||||
* Detach conductor from the widget it is currently attached to
|
||||
|
|
|
@ -88,7 +88,7 @@ nsAutoCompleteController::GetMatchCount(PRUint32 *aMatchCount)
|
|||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsAutoCompleteController::AttachToInput(nsIAutoCompleteInput *aInput)
|
||||
nsAutoCompleteController::AttachToInput(nsIAutoCompleteInput *aInput, const nsAString &aSearchString)
|
||||
{
|
||||
if (!aInput)
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
|
@ -97,6 +97,7 @@ nsAutoCompleteController::AttachToInput(nsIAutoCompleteInput *aInput)
|
|||
DetachFromInput();
|
||||
|
||||
mInput = aInput;
|
||||
mSearchString = aSearchString;
|
||||
|
||||
// reset all search state members to default values
|
||||
mSearchString.Truncate(0);
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
#include "nsFormFillController.h"
|
||||
|
||||
#include "nsFormFillResult.h"
|
||||
#include "nsFormHistory.h"
|
||||
#include "nsIAutoCompleteResultTypes.h"
|
||||
#include "nsString.h"
|
||||
|
@ -173,8 +172,6 @@ nsFormFillController::AttachToBrowser(nsIDocShell *aDocShell, nsIAutoCompletePop
|
|||
mDocShells->AppendElement(aDocShell);
|
||||
mPopups->AppendElement(aPopup);
|
||||
|
||||
printf("AttachToBrowser\n");
|
||||
|
||||
// Listen for focus events on the domWindow of the docShell
|
||||
nsCOMPtr<nsIDOMWindow> domWindow = GetWindowForDocShell(aDocShell);
|
||||
AddFocusListener(domWindow);
|
||||
|
@ -617,7 +614,7 @@ nsFormFillController::StartControllingInput(nsIDOMHTMLInputElement *aInput)
|
|||
AddKeyListener(aInput);
|
||||
|
||||
// Now we are the autocomplete controller's bitch
|
||||
mController->AttachToInput(this);
|
||||
mController->AttachToInput(this, NS_LITERAL_STRING(""));
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Загрузка…
Ссылка в новой задаче