From 2fbcaf9cd5b78b02804855b915569ddca8f09234 Mon Sep 17 00:00:00 2001 From: Justin Dolske Date: Fri, 27 Feb 2015 15:47:37 -0800 Subject: [PATCH] Bug 1135451 - fillForm() cleanup part E: remove didFillForm. r=MattN --- toolkit/components/passwordmgr/LoginManagerContent.jsm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/toolkit/components/passwordmgr/LoginManagerContent.jsm b/toolkit/components/passwordmgr/LoginManagerContent.jsm index d01b7b3c651..3bafece0766 100644 --- a/toolkit/components/passwordmgr/LoginManagerContent.jsm +++ b/toolkit/components/passwordmgr/LoginManagerContent.jsm @@ -742,7 +742,6 @@ var LoginManagerContent = { // We will always have a selectedLogin at this point. - var didFillForm = false; if (autofillForm && !isFormDisabled) { // Fill the form @@ -764,18 +763,17 @@ var LoginManagerContent = { if (passwordField.value != selectedLogin.password) { passwordField.setUserInput(selectedLogin.password); } - didFillForm = true; } else if (!autofillForm) { log("autofillForms=false but form can be filled; notified observers"); recordAutofillResult(AUTOFILL_RESULT.NO_AUTOFILL_FORMS); + return; } else if (isFormDisabled) { log("autocomplete=off but form can be filled; notified observers"); recordAutofillResult(AUTOFILL_RESULT.AUTOCOMPLETE_OFF); + return; } - if (didFillForm) { - recordAutofillResult(AUTOFILL_RESULT.FILLED); - } + recordAutofillResult(AUTOFILL_RESULT.FILLED); }, };