Bug 1474143 - Remove unused 'firstformsubmit' category and gFirstFormSubmitted. r=Ehsan

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matthew Noorenberghe 2019-02-22 15:12:11 +00:00
Родитель 44ada4578b
Коммит 702cf2d5ed
3 изменённых файлов: 0 добавлений и 15 удалений

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

@ -92,8 +92,6 @@ static const nsAttrValue::EnumTable kFormAutocompleteTable[] = {
static const nsAttrValue::EnumTable* kFormDefaultAutocomplete =
&kFormAutocompleteTable[0];
bool HTMLFormElement::gFirstFormSubmitted = false;
HTMLFormElement::HTMLFormElement(
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
: nsGenericHTMLElement(std::move(aNodeInfo)),
@ -852,14 +850,6 @@ nsresult HTMLFormElement::DoSecureToInsecureSubmitCheck(nsIURI* aActionURL,
nsresult HTMLFormElement::NotifySubmitObservers(nsIURI* aActionURL,
bool* aCancelSubmit,
bool aEarlyNotify) {
// If this is the first form, bring alive the first form submit
// category observers
if (!gFirstFormSubmitted) {
gFirstFormSubmitted = true;
NS_CreateServicesFromCategory(NS_FIRST_FORMSUBMIT_CATEGORY, nullptr,
NS_FIRST_FORMSUBMIT_CATEGORY);
}
if (!aEarlyNotify) {
nsresult rv = DoSecureToInsecureSubmitCheck(aActionURL, aCancelSubmit);
if (NS_FAILED(rv)) {

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

@ -602,10 +602,6 @@ class HTMLFormElement final : public nsGenericHTMLElement,
*/
bool mEverTriedInvalidSubmit;
protected:
/** Detection of first form to notify observers */
static bool gFirstFormSubmitted;
private:
~HTMLFormElement();
};

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

@ -25,6 +25,5 @@ interface nsIFormSubmitObserver: nsISupports
%{C++
#define NS_FORMSUBMIT_SUBJECT "formsubmit"
#define NS_EARLYFORMSUBMIT_SUBJECT "earlyformsubmit"
#define NS_FIRST_FORMSUBMIT_CATEGORY "firstformsubmit"
#define NS_INVALIDFORMSUBMIT_SUBJECT "invalidformsubmit"
%}