diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:43:14 +0000 |
commit | 8dd16259287f58f9273002717ec4d27e97127719 (patch) | |
tree | 3863e62a53829a84037444beab3abd4ed9dfc7d0 /toolkit/components/passwordmgr/LoginManagerParent.sys.mjs | |
parent | Releasing progress-linux version 126.0.1-1~progress7.99u1. (diff) | |
download | firefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz firefox-8dd16259287f58f9273002717ec4d27e97127719.zip |
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/passwordmgr/LoginManagerParent.sys.mjs')
-rw-r--r-- | toolkit/components/passwordmgr/LoginManagerParent.sys.mjs | 50 |
1 files changed, 41 insertions, 9 deletions
diff --git a/toolkit/components/passwordmgr/LoginManagerParent.sys.mjs b/toolkit/components/passwordmgr/LoginManagerParent.sys.mjs index 862ab6b846..cb3ea2bd7c 100644 --- a/toolkit/components/passwordmgr/LoginManagerParent.sys.mjs +++ b/toolkit/components/passwordmgr/LoginManagerParent.sys.mjs @@ -829,15 +829,19 @@ export class LoginManagerParent extends JSWindowActorParent { })) ); } - autocompleteItems.push( - ...(await lazy.WebAuthnFeature.autocompleteItemsAsync( - this._overrideBrowsingContextId ?? - this.getRootBrowser().browsingContext.id, - formOrigin, - scenarioName, - isWebAuthn - )) - ); + // This check is only used to init webauthn in tests, which causes + // intermittent like Bug 1890419. + if (LoginManagerParent._webAuthnAutoComplete) { + autocompleteItems.push( + ...(await lazy.WebAuthnFeature.autocompleteItemsAsync( + this._overrideBrowsingContextId ?? + this.getRootBrowser().browsingContext.id, + formOrigin, + scenarioName, + isWebAuthn + )) + ); + } return { generatedPassword, @@ -1541,6 +1545,27 @@ export class LoginManagerParent extends JSWindowActorParent { return gRecipeManager.initializationPromise; } + + async searchAutoCompleteEntries(searchString, data) { + return this.doAutocompleteSearch(data.formOrigin, data); + } + + previewFields(_result) { + // Logins do not show previews + } + + autofillFields(result) { + if (result.style == "login" || result.style == "loginWithOrigin") { + try { + const profile = JSON.parse(result.comment); + this.sendAsyncMessage("PasswordManager:fillFields", profile.login); + } catch (e) { + lazy.log("Fail to get autofill profile: ", e.message); + } + } else if (result.style == "generatedPassword") { + this.sendAsyncMessage("PasswordManager:fillGeneratedPassword"); + } + } } LoginManagerParent.SUGGEST_IMPORT_DEBOUNCE_MS = 10000; @@ -1551,3 +1576,10 @@ XPCOMUtils.defineLazyPreferenceGetter( "signon.masterPasswordReprompt.timeout_ms", 900000 ); // 15 Minutes + +XPCOMUtils.defineLazyPreferenceGetter( + LoginManagerParent, + "_webAuthnAutoComplete", + "signon.webauthn.autocomplete", + true +); |