Bug 1270740 - Remove requestAutocomplete DOM code. r=smaug

MozReview-Commit-ID: FPHXkOlLbKF

--HG--
extra : rebase_source : 144570d1a6428e761e11ad2cd94a3ba7a4a0b711
extra : amend_source : fe5b2ca83f18d648e71ebbcfab57ffaaa3b49fb8
This commit is contained in:
Jonathan Guillotte-Blouin 2017-05-11 15:03:57 -07:00
Родитель 93c09b12e6
Коммит 08c1af9cc5
7 изменённых файлов: 0 добавлений и 143 удалений

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

@ -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<nsIDOMWindow> window =
do_QueryInterface(OwnerDoc()->GetScriptHandlingObject(dummy));
nsCOMPtr<nsIFormAutofillContentService> 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<AutocompleteErrorEvent> 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,

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

@ -416,8 +416,6 @@ public:
js::ExpandoAndGeneration mExpandoAndGeneration;
void RequestAutocomplete();
protected:
virtual JSObject* WrapNode(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;

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

@ -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 = "";
};

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

@ -46,7 +46,4 @@ interface HTMLFormElement : HTMLElement {
void reset();
boolean checkValidity();
boolean reportValidity();
[Pref="dom.forms.requestAutocomplete"]
void requestAutocomplete();
};

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

@ -1054,7 +1054,6 @@ if CONFIG['FUZZING']:
GENERATED_EVENTS_WEBIDL_FILES = [
'AddonEvent.webidl',
'AnimationPlaybackEvent.webidl',
'AutocompleteErrorEvent.webidl',
'BlobEvent.webidl',
'CaretStateChangedEvent.webidl',
'CloseEvent.webidl',

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

@ -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 <select> dropdowns (more than 40 options)
pref("dom.forms.selectSearch", false);
// Allow for webpages to provide custom styling for <select>

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

@ -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