зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
44ada4578b
Коммит
702cf2d5ed
|
@ -92,8 +92,6 @@ static const nsAttrValue::EnumTable kFormAutocompleteTable[] = {
|
||||||
static const nsAttrValue::EnumTable* kFormDefaultAutocomplete =
|
static const nsAttrValue::EnumTable* kFormDefaultAutocomplete =
|
||||||
&kFormAutocompleteTable[0];
|
&kFormAutocompleteTable[0];
|
||||||
|
|
||||||
bool HTMLFormElement::gFirstFormSubmitted = false;
|
|
||||||
|
|
||||||
HTMLFormElement::HTMLFormElement(
|
HTMLFormElement::HTMLFormElement(
|
||||||
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
|
||||||
: nsGenericHTMLElement(std::move(aNodeInfo)),
|
: nsGenericHTMLElement(std::move(aNodeInfo)),
|
||||||
|
@ -852,14 +850,6 @@ nsresult HTMLFormElement::DoSecureToInsecureSubmitCheck(nsIURI* aActionURL,
|
||||||
nsresult HTMLFormElement::NotifySubmitObservers(nsIURI* aActionURL,
|
nsresult HTMLFormElement::NotifySubmitObservers(nsIURI* aActionURL,
|
||||||
bool* aCancelSubmit,
|
bool* aCancelSubmit,
|
||||||
bool aEarlyNotify) {
|
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) {
|
if (!aEarlyNotify) {
|
||||||
nsresult rv = DoSecureToInsecureSubmitCheck(aActionURL, aCancelSubmit);
|
nsresult rv = DoSecureToInsecureSubmitCheck(aActionURL, aCancelSubmit);
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
|
|
|
@ -602,10 +602,6 @@ class HTMLFormElement final : public nsGenericHTMLElement,
|
||||||
*/
|
*/
|
||||||
bool mEverTriedInvalidSubmit;
|
bool mEverTriedInvalidSubmit;
|
||||||
|
|
||||||
protected:
|
|
||||||
/** Detection of first form to notify observers */
|
|
||||||
static bool gFirstFormSubmitted;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~HTMLFormElement();
|
~HTMLFormElement();
|
||||||
};
|
};
|
||||||
|
|
|
@ -25,6 +25,5 @@ interface nsIFormSubmitObserver: nsISupports
|
||||||
%{C++
|
%{C++
|
||||||
#define NS_FORMSUBMIT_SUBJECT "formsubmit"
|
#define NS_FORMSUBMIT_SUBJECT "formsubmit"
|
||||||
#define NS_EARLYFORMSUBMIT_SUBJECT "earlyformsubmit"
|
#define NS_EARLYFORMSUBMIT_SUBJECT "earlyformsubmit"
|
||||||
#define NS_FIRST_FORMSUBMIT_CATEGORY "firstformsubmit"
|
|
||||||
#define NS_INVALIDFORMSUBMIT_SUBJECT "invalidformsubmit"
|
#define NS_INVALIDFORMSUBMIT_SUBJECT "invalidformsubmit"
|
||||||
%}
|
%}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче