diff --git a/dom/html/HTMLFormElement.cpp b/dom/html/HTMLFormElement.cpp
index 4f8fddb893ed..84afd47205d6 100644
--- a/dom/html/HTMLFormElement.cpp
+++ b/dom/html/HTMLFormElement.cpp
@@ -11,7 +11,6 @@
#include "mozilla/EventDispatcher.h"
#include "mozilla/EventStateManager.h"
#include "mozilla/EventStates.h"
-#include "mozilla/dom/AutocompleteErrorEvent.h"
#include "mozilla/dom/nsCSPUtils.h"
#include "mozilla/dom/nsCSPContext.h"
#include "mozilla/dom/nsMixedContentBlocker.h"
@@ -32,7 +31,6 @@
#include "nsAutoPtr.h"
#include "nsTArray.h"
#include "nsIMutableArray.h"
-#include "nsIFormAutofillContentService.h"
#include "mozilla/BinarySearch.h"
#include "nsQueryObject.h"
@@ -286,31 +284,6 @@ HTMLFormElement::CheckValidity(bool* retVal)
return NS_OK;
}
-void
-HTMLFormElement::RequestAutocomplete()
-{
- bool dummy;
- nsCOMPtr window =
- do_QueryInterface(OwnerDoc()->GetScriptHandlingObject(dummy));
- nsCOMPtr formAutofillContentService =
- do_GetService("@mozilla.org/formautofill/content-service;1");
-
- if (!formAutofillContentService || !window) {
- AutocompleteErrorEventInit init;
- init.mBubbles = true;
- init.mCancelable = false;
- init.mReason = AutoCompleteErrorReason::Disabled;
-
- RefPtr event =
- AutocompleteErrorEvent::Constructor(this, NS_LITERAL_STRING("autocompleteerror"), init);
-
- (new AsyncEventDispatcher(this, event))->PostDOMEvent();
- return;
- }
-
- formAutofillContentService->RequestAutocomplete(this, window);
-}
-
bool
HTMLFormElement::ParseAttribute(int32_t aNamespaceID,
nsIAtom* aAttribute,
diff --git a/dom/html/HTMLFormElement.h b/dom/html/HTMLFormElement.h
index 6d925542f4ca..cabbf39d6b71 100644
--- a/dom/html/HTMLFormElement.h
+++ b/dom/html/HTMLFormElement.h
@@ -416,8 +416,6 @@ public:
js::ExpandoAndGeneration mExpandoAndGeneration;
- void RequestAutocomplete();
-
protected:
virtual JSObject* WrapNode(JSContext* aCx, JS::Handle aGivenProto) override;
diff --git a/dom/webidl/AutocompleteErrorEvent.webidl b/dom/webidl/AutocompleteErrorEvent.webidl
deleted file mode 100644
index 23b8ae739259..000000000000
--- a/dom/webidl/AutocompleteErrorEvent.webidl
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-enum AutoCompleteErrorReason {
- "",
- "cancel",
- "disabled",
- "invalid"
-};
-
-[Pref="dom.forms.requestAutocomplete",
- Constructor(DOMString type, optional AutocompleteErrorEventInit eventInitDict)]
-interface AutocompleteErrorEvent : Event
-{
- readonly attribute AutoCompleteErrorReason reason;
-};
-
-dictionary AutocompleteErrorEventInit : EventInit
-{
- AutoCompleteErrorReason reason = "";
-};
diff --git a/dom/webidl/HTMLFormElement.webidl b/dom/webidl/HTMLFormElement.webidl
index dcc909483478..1390bf357d17 100644
--- a/dom/webidl/HTMLFormElement.webidl
+++ b/dom/webidl/HTMLFormElement.webidl
@@ -46,7 +46,4 @@ interface HTMLFormElement : HTMLElement {
void reset();
boolean checkValidity();
boolean reportValidity();
-
- [Pref="dom.forms.requestAutocomplete"]
- void requestAutocomplete();
};
diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build
index 5874276c87fd..00f1bb7a2a24 100644
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -1054,7 +1054,6 @@ if CONFIG['FUZZING']:
GENERATED_EVENTS_WEBIDL_FILES = [
'AddonEvent.webidl',
'AnimationPlaybackEvent.webidl',
- 'AutocompleteErrorEvent.webidl',
'BlobEvent.webidl',
'CaretStateChangedEvent.webidl',
'CloseEvent.webidl',
diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js
index 9cde5e86a4fb..0c0826d21377 100644
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -1239,9 +1239,6 @@ pref("dom.forms.datetime.timepicker", false);
// Support for new @autocomplete values
pref("dom.forms.autocomplete.experimental", false);
-// Enables requestAutocomplete DOM API on forms.
-pref("dom.forms.requestAutocomplete", false);
-
// Enable search in