author | Matthew Noorenberghe <mozilla@noorenberghe.ca> |
Sat, 23 Feb 2019 00:23:14 +0000 | |
changeset 460693 | ffc0f96ff0b12b89142e2097889e2b2c8eb31e48 |
parent 460692 | 93aed64c54ca61d0cc4cfa137461c18ce2abadc9 |
child 460694 | edb3dd4160834837f04d3bb7f810c7424b7ffc4a |
push id | 35596 |
push user | rmaries@mozilla.com |
push date | Sat, 23 Feb 2019 04:13:22 +0000 |
treeherder | mozilla-central@fdd04819e350 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | Ehsan |
bugs | 1474143 |
milestone | 67.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/html/HTMLFormElement.cpp +++ b/dom/html/HTMLFormElement.cpp @@ -88,17 +88,16 @@ static const nsAttrValue::EnumTable kFor {"on", NS_FORM_AUTOCOMPLETE_ON}, {"off", NS_FORM_AUTOCOMPLETE_OFF}, {nullptr, 0}}; // Default autocomplete value is 'on'. static const nsAttrValue::EnumTable* kFormDefaultAutocomplete = &kFormAutocompleteTable[0]; bool HTMLFormElement::gFirstFormSubmitted = false; -bool HTMLFormElement::gPasswordManagerInitialized = false; HTMLFormElement::HTMLFormElement( already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo) : nsGenericHTMLElement(std::move(aNodeInfo)), mControls(new HTMLFormControlsCollection(this)), mSelectedRadioButtons(2), mRequiredRadioButtonCounts(2), mValueMissingRadioGroups(2), @@ -1119,26 +1118,18 @@ nsresult HTMLFormElement::AddElement(nsG bool lastElement = AddElementToList(controlList, aChild, this); #ifdef DEBUG AssertDocumentOrder(controlList, this); #endif 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(); } // Default submit element handling if (aChild->IsSubmitControl()) { // Update mDefaultSubmitElement, mFirstSubmitInElements, // mFirstSubmitNotInElements.
--- a/dom/html/HTMLFormElement.h +++ b/dom/html/HTMLFormElement.h @@ -600,18 +600,16 @@ class HTMLFormElement final : public nsG * Whether the submission of this form has been ever prevented because of * being invalid. */ bool mEverTriedInvalidSubmit; 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(); }; } // namespace dom } // namespace mozilla
--- a/dom/html/nsIFormSubmitObserver.idl +++ b/dom/html/nsIFormSubmitObserver.idl @@ -21,11 +21,10 @@ interface nsIFormSubmitObserver: nsISupp void notifyInvalidSubmit(in HTMLFormElement formNode, in Array<Element> invalidElements); }; %{C++ #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" %}