Bug 1474143 - Remove unused 'passwordmanager' category and gPasswordManagerInitialized. r=Ehsan

Differential Revision: https://phabricator.services.mozilla.com/D16649

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matthew Noorenberghe 2019-02-23 00:23:14 +00:00
Родитель b15b8a8c36
Коммит cc5d6f955d
3 изменённых файлов: 1 добавлений и 13 удалений

Просмотреть файл

@ -93,7 +93,6 @@ static const nsAttrValue::EnumTable* kFormDefaultAutocomplete =
&kFormAutocompleteTable[0];
bool HTMLFormElement::gFirstFormSubmitted = false;
bool HTMLFormElement::gPasswordManagerInitialized = false;
HTMLFormElement::HTMLFormElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
@ -1124,16 +1123,8 @@ nsresult HTMLFormElement::AddElement(nsGenericHTMLFormElement* aChild,
int32_t type = aChild->ControlType();
//
// If it is a password control, and the password manager has not yet been
// initialized, initialize the password manager
//
// If it is a password control, inform the password manager.
if (type == NS_FORM_INPUT_PASSWORD) {
if (!gPasswordManagerInitialized) {
gPasswordManagerInitialized = true;
NS_CreateServicesFromCategory(NS_PASSWORDMANAGER_CATEGORY, nullptr,
NS_PASSWORDMANAGER_CATEGORY);
}
PostPasswordEvent();
}

Просмотреть файл

@ -605,8 +605,6 @@ class HTMLFormElement final : public nsGenericHTMLElement,
protected:
/** Detection of first form to notify observers */
static bool gFirstFormSubmitted;
/** Detection of first password input to initialize the password manager */
static bool gPasswordManagerInitialized;
private:
~HTMLFormElement();

Просмотреть файл

@ -26,6 +26,5 @@ interface nsIFormSubmitObserver: nsISupports
#define NS_FORMSUBMIT_SUBJECT "formsubmit"
#define NS_EARLYFORMSUBMIT_SUBJECT "earlyformsubmit"
#define NS_FIRST_FORMSUBMIT_CATEGORY "firstformsubmit"
#define NS_PASSWORDMANAGER_CATEGORY "passwordmanager"
#define NS_INVALIDFORMSUBMIT_SUBJECT "invalidformsubmit"
%}