From 702cf2d5ed22124362cc98558460210dd4f19caf Mon Sep 17 00:00:00 2001 From: Matthew Noorenberghe Date: Fri, 22 Feb 2019 15:12:11 +0000 Subject: [PATCH] Bug 1474143 - Remove unused 'firstformsubmit' category and gFirstFormSubmitted. r=Ehsan Differential Revision: https://phabricator.services.mozilla.com/D16650 --HG-- extra : moz-landing-system : lando --- dom/html/HTMLFormElement.cpp | 10 ---------- dom/html/HTMLFormElement.h | 4 ---- dom/html/nsIFormSubmitObserver.idl | 1 - 3 files changed, 15 deletions(-) diff --git a/dom/html/HTMLFormElement.cpp b/dom/html/HTMLFormElement.cpp index 2a034164b7a9..9863605c5295 100644 --- a/dom/html/HTMLFormElement.cpp +++ b/dom/html/HTMLFormElement.cpp @@ -92,8 +92,6 @@ static const nsAttrValue::EnumTable kFormAutocompleteTable[] = { static const nsAttrValue::EnumTable* kFormDefaultAutocomplete = &kFormAutocompleteTable[0]; -bool HTMLFormElement::gFirstFormSubmitted = false; - HTMLFormElement::HTMLFormElement( already_AddRefed&& 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)) { diff --git a/dom/html/HTMLFormElement.h b/dom/html/HTMLFormElement.h index 68be8d407687..19ba26cb66b1 100644 --- a/dom/html/HTMLFormElement.h +++ b/dom/html/HTMLFormElement.h @@ -602,10 +602,6 @@ class HTMLFormElement final : public nsGenericHTMLElement, */ bool mEverTriedInvalidSubmit; - protected: - /** Detection of first form to notify observers */ - static bool gFirstFormSubmitted; - private: ~HTMLFormElement(); }; diff --git a/dom/html/nsIFormSubmitObserver.idl b/dom/html/nsIFormSubmitObserver.idl index 0e3515f41f04..36ee240f37f4 100644 --- a/dom/html/nsIFormSubmitObserver.idl +++ b/dom/html/nsIFormSubmitObserver.idl @@ -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" %}