Bug 1526522 - Provide visual effects on password field autocomplete. r=MattN

Differential Revision: https://phabricator.services.mozilla.com/D20745
This commit is contained in:
prathiksha
2019-03-19 16:57:18 +00:00
parent fce0a051f3
commit 5e3dc75527
5 changed files with 60 additions and 7 deletions

View File

@@ -592,9 +592,21 @@ NS_IMETHODIMP
nsFormFillController::OnSearchComplete() { return NS_OK; }
NS_IMETHODIMP
nsFormFillController::OnTextEntered(Event* aEvent, bool* aPrevent) {
nsFormFillController::OnTextEntered(Event* aEvent, bool itemWasSelected,
bool* aPrevent) {
NS_ENSURE_ARG(aPrevent);
NS_ENSURE_TRUE(mFocusedInput, NS_OK);
/**
* This function can get called when text wasn't actually entered
* into the field (e.g. if an autocomplete item wasn't selected) so
* we don't fire DOMAutoComplete in that case since nothing
* was actually autocompleted.
*/
if (!itemWasSelected) {
return NS_OK;
}
// Fire off a DOMAutoComplete event
IgnoredErrorResult ignored;