Bugzilla
Quick Search
Browse
Advanced Search
Reports
Quick Search Help
Documentation
New Account
Log In
Login with GitHub
Remember
Forgot Password
Mozilla Home
Privacy
Cookies
Legal
Attachment 8645975 Details for
Bug 1159538
[patch]
bug-1159538.patch
bug-1159538.patch (text/plain), 1.79 KB, created by
Edouard Oger [:eoger]
(
hide
)
Description:
bug-1159538.patch
Filename:
MIME Type:
Creator:
Edouard Oger [:eoger]
Size:
1.79 KB
patch
obsolete
># HG changeset patch ># User Edouard Oger <edouard.oger@gmail.com> > >Bug 1159538 - Allow per-site recipes to adjust the username/password field detection for onUsernameInput > > >diff --git a/toolkit/components/passwordmgr/LoginManagerContent.jsm b/toolkit/components/passwordmgr/LoginManagerContent.jsm >index f70de57..5a7976f 100644 >--- a/toolkit/components/passwordmgr/LoginManagerContent.jsm >+++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm >@@ -516,20 +516,30 @@ var LoginManagerContent = { > // If the username is blank, bail out now -- we don't want > // fillForm() to try filling in a login without a username > // to filter on (bug 471906). > if (!acInputField.value) > return; > > log("onUsernameInput from", event.type); > >+ let doc = acForm.ownerDocument; >+ let win = doc.defaultView; >+ let hostname = LoginUtils._getPasswordOrigin(doc.documentURI); >+ >+ let messageManager = messageManagerFromWindow(win); >+ let recipesArray = messageManager.sendSyncMessage("RemoteLogins:findRecipes", { >+ formOrigin: hostname, >+ })[0]; >+ let recipes = new Set(recipesArray); >+ > // Make sure the username field fillForm will use is the > // same field as the autocomplete was activated on. > var [usernameField, passwordField, ignored] = >- this._getFormFields(acForm, false); >+ this._getFormFields(acForm, false, recipes); > if (usernameField == acInputField && passwordField) { > this._getLoginDataFromParent(acForm, { showMasterPassword: false }) > .then(({ form, loginsFound, recipes }) => { > this._fillForm(form, true, false, true, true, loginsFound, recipes); > }) > .then(null, Cu.reportError); > } else { > // Ignore the event, it's for some input we don't care about. >-- >2.3.2 (Apple Git-55) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Flags:
MattN
: feedback+
Actions:
View
|
Diff
|
Review
Attachments on
bug 1159538
:
8645975
|
8647284