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 diff --git a/testing/web-platform/meta/html/dom/interfaces.html.ini b/testing/web-platform/meta/html/dom/interfaces.html.ini index 22601050e1c5..b46d4cc0adb0 100644 --- a/testing/web-platform/meta/html/dom/interfaces.html.ini +++ b/testing/web-platform/meta/html/dom/interfaces.html.ini @@ -112,12 +112,6 @@ [Document interface: attribute all] expected: FAIL - [Document interface: attribute onautocomplete] - expected: FAIL - - [Document interface: attribute onautocompleteerror] - expected: FAIL - [Document interface: attribute oncancel] expected: FAIL @@ -160,12 +154,6 @@ [Document interface: calling queryAll(DOMString) on iframe.contentDocument with too few arguments must throw TypeError] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "onautocomplete" with the proper type (94)] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "onautocompleteerror" with the proper type (95)] - expected: FAIL - [Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type (97)] expected: FAIL @@ -343,12 +331,6 @@ [Document interface: calling queryAll(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError] expected: FAIL - [Document interface: document.implementation.createDocument(null, "", null) must inherit property "onautocomplete" with the proper type (94)] - expected: FAIL - - [Document interface: document.implementation.createDocument(null, "", null) must inherit property "onautocompleteerror" with the proper type (95)] - expected: FAIL - [Document interface: document.implementation.createDocument(null, "", null) must inherit property "oncancel" with the proper type (97)] expected: FAIL @@ -460,12 +442,6 @@ [HTMLElement interface: attribute commandChecked] expected: FAIL - [HTMLElement interface: attribute onautocomplete] - expected: FAIL - - [HTMLElement interface: attribute onautocompleteerror] - expected: FAIL - [HTMLElement interface: attribute oncancel] expected: FAIL @@ -505,12 +481,6 @@ [HTMLElement interface: document.createElement("noscript") must inherit property "commandChecked" with the proper type (24)] expected: FAIL - [HTMLElement interface: document.createElement("noscript") must inherit property "onautocomplete" with the proper type (26)] - expected: FAIL - - [HTMLElement interface: document.createElement("noscript") must inherit property "onautocompleteerror" with the proper type (27)] - expected: FAIL - [HTMLElement interface: document.createElement("noscript") must inherit property "oncancel" with the proper type (29)] expected: FAIL @@ -1081,12 +1051,6 @@ [HTMLTableHeaderCellElement interface: document.createElement("th") must inherit property "sort" with the proper type (3)] expected: FAIL - [HTMLFormElement interface: operation requestAutocomplete()] - expected: FAIL - - [HTMLFormElement interface: document.createElement("form") must inherit property "requestAutocomplete" with the proper type (17)] - expected: FAIL - [HTMLInputElement interface: attribute dirName] expected: FAIL @@ -1282,21 +1246,6 @@ [HTMLMeterElement interface: document.createElement("meter") must inherit property "labels" with the proper type (6)] expected: FAIL - [AutocompleteErrorEvent interface: existence and properties of interface object] - expected: FAIL - - [AutocompleteErrorEvent interface object length] - expected: FAIL - - [AutocompleteErrorEvent interface: existence and properties of interface prototype object] - expected: FAIL - - [AutocompleteErrorEvent interface: existence and properties of interface prototype object's "constructor" property] - expected: FAIL - - [AutocompleteErrorEvent interface: attribute reason] - expected: FAIL - [HTMLMenuItemElement interface: attribute default] expected: FAIL @@ -1568,12 +1517,6 @@ disabled: if e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=981796 - [Window interface: attribute onautocomplete] - expected: FAIL - - [Window interface: attribute onautocompleteerror] - expected: FAIL - [Window interface: attribute oncancel] expected: FAIL @@ -1593,12 +1536,6 @@ disabled: if e10s: https://bugzilla.mozilla.org/show_bug.cgi?id=981796 - [Window interface: window must inherit property "onautocomplete" with the proper type (39)] - expected: FAIL - - [Window interface: window must inherit property "onautocompleteerror" with the proper type (40)] - expected: FAIL - [Window interface: window must inherit property "oncancel" with the proper type (42)] expected: FAIL @@ -1930,12 +1867,6 @@ [Document interface: iframe.contentDocument must inherit property "queryAll" with the proper type (91)] expected: FAIL - [Document interface: iframe.contentDocument must inherit property "onautocomplete" with the proper type (95)] - expected: FAIL - - [Document interface: iframe.contentDocument must inherit property "onautocompleteerror" with the proper type (96)] - expected: FAIL - [Document interface: iframe.contentDocument must inherit property "oncancel" with the proper type (98)] expected: FAIL @@ -2065,12 +1996,6 @@ [Document interface: document.implementation.createDocument(null, "", null) must inherit property "queryAll" with the proper type (91)] expected: FAIL - [Document interface: document.implementation.createDocument(null, "", null) must inherit property "onautocomplete" with the proper type (95)] - expected: FAIL - - [Document interface: document.implementation.createDocument(null, "", null) must inherit property "onautocompleteerror" with the proper type (96)] - expected: FAIL - [Document interface: document.implementation.createDocument(null, "", null) must inherit property "oncancel" with the proper type (98)] expected: FAIL @@ -2113,9 +2038,6 @@ [HTMLKeygenElement interface object name] expected: FAIL - [AutocompleteErrorEvent interface object name] - expected: FAIL - [RelatedEvent interface object name] expected: FAIL @@ -2311,12 +2233,6 @@ [Document interface: calling queryAll(DOMString) on new Document() with too few arguments must throw TypeError] expected: FAIL - [Document interface: new Document() must inherit property "onautocomplete" with the proper type (94)] - expected: FAIL - - [Document interface: new Document() must inherit property "onautocompleteerror" with the proper type (95)] - expected: FAIL - [Document interface: new Document() must inherit property "oncancel" with the proper type (97)] expected: FAIL