Remove unmaintained feature REQUEST_AUTOCOMPLETE
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2013 08:40:55 +0000 (08:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 19 Apr 2013 08:40:55 +0000 (08:40 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114846

Patch by Dan Beam <dbeam@chromium.org> on 2013-04-19
Reviewed by Kent Tamura.

Source/WebCore:

* GNUmakefile.list.am: Remove AutocompleteErrorEvent.h include.
* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore): Remove requestAutocomplete() runtime feature.
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures): Remove requestAutocomplete() runtime feature.
* dom/AutocompleteErrorEvent.h: Removed.
* dom/AutocompleteErrorEvent.idl: Removed.
* dom/EventNames.h: Remove `autocomplete` and `autocompleteerror` event names.
(WebCore):
* dom/EventNames.in: Remove `autocomplete` and `autocompleteerror` event names.
* html/HTMLAttributeNames.in: Remove `onautocomplete` and `onautocompleteerror` form attributes.
* html/HTMLFormElement.cpp: Remove requestAutocomplete() related code.
(WebCore::HTMLFormElement::HTMLFormElement): Remove timer and event queue for requestAutocomplete() related events.
(WebCore::HTMLFormElement::parseAttribute): Remove parsing of `onautocomplete` and `onautocompleterror`.
* html/HTMLFormElement.h: Remove requestAutocomplete() related members.
(HTMLFormElement):
* html/HTMLFormElement.idl: Remove public requestAutocomplete() API method.
* loader/EmptyClients.cpp: Remove stub implementation.
(WebCore):
* loader/EmptyClients.h: Remove stub interface.
(EmptyFrameLoaderClient):
* loader/FrameLoaderClient.h: Remove didRequestAutocomplete() from interface.
(FrameLoaderClient):
* page/DOMWindow.idl: Remove `AutocompleteErrorEvent` from window DOM interface.

Source/WTF:

* wtf/FeatureDefines.h: Remove REQUEST_AUTOCOMPLETE as a feature definition.

LayoutTests:

* fast/events/constructors/autocomplete-error-event-constructor-expected.txt: Removed.
* fast/events/constructors/autocomplete-error-event-constructor.html: Removed.
* fast/events/event-creation.html: Remove AutocompleteErrorEvent test code.
* fast/forms/form-request-autocomplete-expected.txt: Removed.
* fast/forms/form-request-autocomplete.html: Removed.
* fast/js/constructor-length.html: Remove AutocompleteErrorEvent test code.
* fast/js/script-tests/global-constructors.js: Remove AutocompleteErrorEvent constructor.
* platform/blackberry/fast/js/constructor-length-expected.txt: Remove test expectations.
* platform/gtk/fast/js/constructor-length-expected.txt: Remove test expectations.
* platform/mac/fast/js/constructor-length-expected.txt: Remove test expectations.
* platform/qt/fast/js/constructor-length-expected.txt: Remove test expectations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148731 268f45cc-cd09-0410-ab3c-d52691b4dbfc

30 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/constructors/autocomplete-error-event-constructor-expected.txt [deleted file]
LayoutTests/fast/events/constructors/autocomplete-error-event-constructor.html [deleted file]
LayoutTests/fast/events/event-creation.html
LayoutTests/fast/forms/form-request-autocomplete-expected.txt [deleted file]
LayoutTests/fast/forms/form-request-autocomplete.html [deleted file]
LayoutTests/fast/js/constructor-length.html
LayoutTests/fast/js/script-tests/global-constructors.js
LayoutTests/platform/blackberry/fast/js/constructor-length-expected.txt
LayoutTests/platform/gtk/fast/js/constructor-length-expected.txt
LayoutTests/platform/mac/fast/js/constructor-length-expected.txt
LayoutTests/platform/qt/fast/js/constructor-length-expected.txt
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebCore/dom/AutocompleteErrorEvent.h [deleted file]
Source/WebCore/dom/AutocompleteErrorEvent.idl [deleted file]
Source/WebCore/dom/EventNames.h
Source/WebCore/dom/EventNames.in
Source/WebCore/html/HTMLAttributeNames.in
Source/WebCore/html/HTMLFormElement.cpp
Source/WebCore/html/HTMLFormElement.h
Source/WebCore/html/HTMLFormElement.idl
Source/WebCore/loader/EmptyClients.cpp
Source/WebCore/loader/EmptyClients.h
Source/WebCore/loader/FrameLoaderClient.h
Source/WebCore/page/DOMWindow.idl

index 7213031..56151cb 100644 (file)
@@ -1,3 +1,22 @@
+2013-04-19  Dan Beam  <dbeam@chromium.org>
+
+        Remove unmaintained feature REQUEST_AUTOCOMPLETE
+        https://bugs.webkit.org/show_bug.cgi?id=114846
+
+        Reviewed by Kent Tamura.
+
+        * fast/events/constructors/autocomplete-error-event-constructor-expected.txt: Removed.
+        * fast/events/constructors/autocomplete-error-event-constructor.html: Removed.
+        * fast/events/event-creation.html: Remove AutocompleteErrorEvent test code.
+        * fast/forms/form-request-autocomplete-expected.txt: Removed.
+        * fast/forms/form-request-autocomplete.html: Removed.
+        * fast/js/constructor-length.html: Remove AutocompleteErrorEvent test code.
+        * fast/js/script-tests/global-constructors.js: Remove AutocompleteErrorEvent constructor.
+        * platform/blackberry/fast/js/constructor-length-expected.txt: Remove test expectations.
+        * platform/gtk/fast/js/constructor-length-expected.txt: Remove test expectations.
+        * platform/mac/fast/js/constructor-length-expected.txt: Remove test expectations.
+        * platform/qt/fast/js/constructor-length-expected.txt: Remove test expectations.
+
 2013-04-18  Timothy Hatcher  <timothy@apple.com>
 
         Add CSS.setStyleText to the Web Inspector protocol.
diff --git a/LayoutTests/fast/events/constructors/autocomplete-error-event-constructor-expected.txt b/LayoutTests/fast/events/constructors/autocomplete-error-event-constructor-expected.txt
deleted file mode 100644 (file)
index 7d7a5fc..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-This tests the constructor for the AutocompleteErrorEvent DOM class.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-FAIL no AutocompleteErrorEvent
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/events/constructors/autocomplete-error-event-constructor.html b/LayoutTests/fast/events/constructors/autocomplete-error-event-constructor.html
deleted file mode 100644 (file)
index db1cec7..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../../js/resources/js-test-pre.js"></script>
-</head>
-<body>
-<script>
-
-description("This tests the constructor for the AutocompleteErrorEvent DOM class.");
-
-if (!window.AutocompleteErrorEvent) {
-    testFailed('no AutocompleteErrorEvent');
-    finishJSTest();
-} else {
-    // No initializer is passed.
-    shouldBe("new AutocompleteErrorEvent('eventType').bubbles", "false");
-    shouldBe("new AutocompleteErrorEvent('eventType').cancelable", "false");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType').reason", "");
-
-    // bubbles is passed.
-    shouldBe("new AutocompleteErrorEvent('eventType', { bubbles: false }).bubbles", "false");
-    shouldBe("new AutocompleteErrorEvent('eventType', { bubbles: true }).bubbles", "true");
-
-    // cancelable is passed.
-    shouldBe("new AutocompleteErrorEvent('eventType', { cancelable: false }).cancelable", "false");
-    shouldBe("new AutocompleteErrorEvent('eventType', { cancelable: true }).cancelable", "true");
-
-    // reason is passed.
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: 'doremi' }).reason", "doremi");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: '' }).reason", "");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: undefined }).reason", "undefined");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: null }).reason", "null");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: false }).reason", "false");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: true }).reason", "true");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: 12345 }).reason", "12345");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: 18446744073709551615 }).reason", "18446744073709552000");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: NaN }).reason", "NaN");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: [] }).reason", "");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: [1, 2, 3] }).reason", "1,2,3");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: {doremi: 12345} }).reason", "[object Object]");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { reason: {valueOf: function () { return 'doremi'; } } }).reason", "[object Object]");
-
-    // All initializers are passed.
-    shouldBe("new AutocompleteErrorEvent('eventType', { bubbles: true, cancelable: true, reason: 'doremi' }).bubbles", "true");
-    shouldBe("new AutocompleteErrorEvent('eventType', { bubbles: true, cancelable: true, reason: 'doremi' }).cancelable", "true");
-    shouldBeEqualToString("new AutocompleteErrorEvent('eventType', { bubbles: true, cancelable: true, reason: 'doremi' }).reason", "doremi");
-}
-
-</script>
-<script src="../../js/resources/js-test-post.js"></script>
-</body>
-</html>
index 1d8e359..31ba7e2 100644 (file)
     // shouldBeTrue("document.createEvent('OrientationEvent') instanceof window.Event");
     // shouldBeTrue("document.createEvent('OrientationEvent').constructor === window.Event");
 
-    // #if ENABLE(REQUEST_AUTOCOMPLETE)
-    // AutocompleteErrorEvent
-    // shouldBeTrue("document.createEvent('AutocompleteErrorEvent') instanceof window.AutocompleteErrorEvent");
-    // shouldBeTrue("document.createEvent('AutocompleteErrorEvent') instanceof window.Event");
-    // shouldBeTrue("document.createEvent('AutocompleteErrorEvent').constructor === window.AutocompleteErrorEvent");
-
     // We test both a hard coded set and the automated set below (using enumeration) to ensure that a constructor being removed
     // from the window is caught a regression.
 
diff --git a/LayoutTests/fast/forms/form-request-autocomplete-expected.txt b/LayoutTests/fast/forms/form-request-autocomplete-expected.txt
deleted file mode 100644 (file)
index dfee796..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-HTMLFormElement#requestAutocomplete and associated events
-
-For this test to pass, you should see all PASSED below.
-
-FAIL no requestAutocomplete function
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
diff --git a/LayoutTests/fast/forms/form-request-autocomplete.html b/LayoutTests/fast/forms/form-request-autocomplete.html
deleted file mode 100644 (file)
index 77b471b..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script src="../js/resources/js-test-pre.js"></script>
-<script>
-jsTestIsAsync = true;
-
-var numErrors = 0;
-var numErrorsExpected = 0;
-
-function runTests()
-{
-    if (typeof HTMLFormElement.prototype.requestAutocomplete != 'function') {
-        testFailed('no requestAutocomplete function');
-        finishJSTest();
-        return;
-    }
-
-    checkDynamicAttributes();
-    checkParsedAttributes();
-    checkNonUserGesture();
-}
-
-function checkForEnumerableProperties(form)
-{
-    var enumerated = false;
-    for (var field in form) {
-        if (/onautocomplete/.test(field))
-            testFailed('enumerable form attribute found on HTMLFormElement: ' + field);
-        enumerated = true;
-    }
-    if (enumerated)
-        testPassed('no enumerable properties on HTMLFormElement');
-    else
-        testFailed('failed to enumerate HTMLFormElement properties');
-}
-
-function checkParsedAttributes()
-{
-    numErrorsExpected += 1;
-
-    var form = document.forms[0];
-    checkForEnumerableProperties(form);
-
-    // Currently Chrome just immediately dispatches an error.
-    form.onautocompleteerror = errorWithReason('disabled');
-    form.requestAutocomplete();
-}
-
-function checkDynamicAttributes()
-{
-    numErrorsExpected += 1;
-
-    var form = document.createElement('form');
-    checkForEnumerableProperties(form);
-
-    form.autocomplete = 'off';
-    form.onautocompleteerror = errorWithReason('disabled');
-    form.requestAutocomplete();
-}
-
-function checkNonUserGesture()
-{
-    numErrorsExpected += 1;
-
-    var form = document.createElement('form');
-    checkForEnumerableProperties(form);
-    form.onautocompleteerror = errorWithReason('disabled');
-
-    setTimeout(function()
-    {
-        form.requestAutocomplete();
-    }, 0);
-}
-
-function errorWithReason(reason)
-{
-    return function(event) {
-        if (event instanceof AutocompleteErrorEvent)
-            testPassed('event is an AutocompleteErrorEvent');
-        else
-            testFailed('expected an AutocompleteErrorEvent');
-
-        if (event.reason == reason)
-            testPassed('got expected reason: ' + reason);
-        else
-            testFailed('wrong reason, expected: ' + reason + ', got: ' + event.reason);
-
-        onError();
-    };
-}
-
-function onError()
-{
-    numErrors += 1;
-    if (numErrors > numErrorsExpected)
-        testFailed('too many error events');
-    else if (numErrors == numErrorsExpected) {
-        testPassed('got expected number of error events (' + numErrorsExpected + ')');
-        finishJSTest();
-    }
-}
-
-window.addEventListener('load', runTests, true);
-</script>
-</head>
-<body>
-<p> <a href="http://bugs.webkit.org/show_bug.cgi?id=100557">HTMLFormElement#requestAutocomplete and associated events</a> </p>
-<p> For this test to pass, you should see all PASSED below. </p>
-<form autocomplete="off" onautocompleteerror="onError();"></form>
-<p id="console"></p>
-<script src="../js/resources/js-test-post.js"></script>
-</body>
-</html>
index 1d4e46a..f30924d 100644 (file)
@@ -9,7 +9,6 @@ description("This tests the length property of constructors.");
 
 shouldBe('ArrayBuffer.length', '1');
 shouldBe('AudioContext.length', '0');
-shouldBe('AutocompleteErrorEvent.length', '2');
 shouldBe('BeforeLoadEvent.length', '2');
 shouldBe('Blob.length', '2');
 shouldBe('CloseEvent.length', '2');
index ae72ca2..43d4336 100644 (file)
@@ -39,8 +39,7 @@ for (var x in constructorNames) {
         name == "Float32Array" ||
         name == "Float64Array" ||
         name == "FileError" ||
-        name == "FileReader" ||
-        name == "AutocompleteErrorEvent")
+        name == "FileReader")
         continue;
 
     if (name == "XMLDocument")
index 39127d1..9dbffc9 100644 (file)
@@ -5,7 +5,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
-FAIL AutocompleteErrorEvent.length should be 2. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS BeforeLoadEvent.length is 2
 PASS Blob.length is 2
 PASS CloseEvent.length is 2
index 9628a7b..319d4c2 100644 (file)
@@ -5,7 +5,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
-FAIL AutocompleteErrorEvent.length should be 2. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS BeforeLoadEvent.length is 2
 PASS Blob.length is 2
 PASS CloseEvent.length is 2
index 9628a7b..319d4c2 100644 (file)
@@ -5,7 +5,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
-FAIL AutocompleteErrorEvent.length should be 2. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS BeforeLoadEvent.length is 2
 PASS Blob.length is 2
 PASS CloseEvent.length is 2
index 90db111..103ef4a 100644 (file)
@@ -5,7 +5,6 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 PASS ArrayBuffer.length is 1
 FAIL AudioContext.length should be 0. Threw exception ReferenceError: Can't find variable: AudioContext
-FAIL AutocompleteErrorEvent.length should be 2. Threw exception ReferenceError: Can't find variable: AutocompleteErrorEvent
 PASS BeforeLoadEvent.length is 2
 PASS Blob.length is 2
 PASS CloseEvent.length is 2
index a452c5d..fdd21fb 100644 (file)
@@ -1,3 +1,12 @@
+2013-04-19  Dan Beam  <dbeam@chromium.org>
+
+        Remove unmaintained feature REQUEST_AUTOCOMPLETE
+        https://bugs.webkit.org/show_bug.cgi?id=114846
+
+        Reviewed by Kent Tamura.
+
+        * wtf/FeatureDefines.h: Remove REQUEST_AUTOCOMPLETE as a feature definition.
+
 2013-04-18  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
 
         Speculative build fix for Qt Mountain Lion Release after r148639.
index afad174..7a29eae 100644 (file)
 #define ENABLE_REQUEST_ANIMATION_FRAME 0
 #endif
 
-#if !defined(ENABLE_REQUEST_AUTOCOMPLETE)
-#define ENABLE_REQUEST_AUTOCOMPLETE 0
-#endif
-
 #if !defined(ENABLE_RUBBER_BANDING)
 #define ENABLE_RUBBER_BANDING 0
 #endif
index b23e016..58f1d0b 100644 (file)
@@ -1,3 +1,35 @@
+2013-04-19  Dan Beam  <dbeam@chromium.org>
+
+        Remove unmaintained feature REQUEST_AUTOCOMPLETE
+        https://bugs.webkit.org/show_bug.cgi?id=114846
+
+        Reviewed by Kent Tamura.
+
+        * GNUmakefile.list.am: Remove AutocompleteErrorEvent.h include.
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        (WebCore): Remove requestAutocomplete() runtime feature.
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (RuntimeEnabledFeatures): Remove requestAutocomplete() runtime feature.
+        * dom/AutocompleteErrorEvent.h: Removed.
+        * dom/AutocompleteErrorEvent.idl: Removed.
+        * dom/EventNames.h: Remove `autocomplete` and `autocompleteerror` event names.
+        (WebCore):
+        * dom/EventNames.in: Remove `autocomplete` and `autocompleteerror` event names.
+        * html/HTMLAttributeNames.in: Remove `onautocomplete` and `onautocompleteerror` form attributes.
+        * html/HTMLFormElement.cpp: Remove requestAutocomplete() related code.
+        (WebCore::HTMLFormElement::HTMLFormElement): Remove timer and event queue for requestAutocomplete() related events.
+        (WebCore::HTMLFormElement::parseAttribute): Remove parsing of `onautocomplete` and `onautocompleterror`.
+        * html/HTMLFormElement.h: Remove requestAutocomplete() related members.
+        (HTMLFormElement):
+        * html/HTMLFormElement.idl: Remove public requestAutocomplete() API method.
+        * loader/EmptyClients.cpp: Remove stub implementation.
+        (WebCore):
+        * loader/EmptyClients.h: Remove stub interface.
+        (EmptyFrameLoaderClient):
+        * loader/FrameLoaderClient.h: Remove didRequestAutocomplete() from interface.
+        (FrameLoaderClient):
+        * page/DOMWindow.idl: Remove `AutocompleteErrorEvent` from window DOM interface.
+
 2013-04-18  Timothy Hatcher  <timothy@apple.com>
 
         Add CSS.setStyleText to the Web Inspector protocol.
index e76e1d0..82d2dd4 100644 (file)
@@ -2782,7 +2782,6 @@ webcore_sources += \
        Source/WebCore/dom/Attr.cpp \
        Source/WebCore/dom/Attr.h \
        Source/WebCore/dom/Attribute.h \
-       Source/WebCore/dom/AutocompleteErrorEvent.h \
        Source/WebCore/dom/BeforeLoadEvent.h \
        Source/WebCore/dom/BeforeTextInsertedEvent.cpp \
        Source/WebCore/dom/BeforeTextInsertedEvent.h \
index f021bc7..d2f073d 100644 (file)
@@ -231,10 +231,6 @@ bool RuntimeEnabledFeatures::isInputTypeWeekEnabled = true;
 bool RuntimeEnabledFeatures::isDialogElementEnabled = false;
 #endif
 
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-bool RuntimeEnabledFeatures::isRequestAutocompleteEnabled = false;
-#endif
-
 #if ENABLE(CSP_NEXT)
 bool RuntimeEnabledFeatures::areExperimentalContentSecurityPolicyFeaturesEnabled = false;
 #endif
index b4e7775..8337397 100644 (file)
@@ -298,11 +298,6 @@ public:
     // The lang attribute support is incomplete and should only be turned on for tests.
     static void setLangAttributeAwareFormControlUIEnabled(bool isEnabled) { isLangAttributeAwareFormControlUIEnabled = isEnabled; }
 
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-    static bool requestAutocompleteEnabled() { return isRequestAutocompleteEnabled; }
-    static void setRequestAutocompleteEnabled(bool isEnabled) { isRequestAutocompleteEnabled = isEnabled; }
-#endif
-
 private:
     // Never instantiate.
     RuntimeEnabledFeatures() { }
@@ -410,10 +405,6 @@ private:
     static bool isDialogElementEnabled;
 #endif
 
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-    static bool isRequestAutocompleteEnabled;
-#endif
-
 #if ENABLE(CSP_NEXT)
     static bool areExperimentalContentSecurityPolicyFeaturesEnabled;
 #endif
diff --git a/Source/WebCore/dom/AutocompleteErrorEvent.h b/Source/WebCore/dom/AutocompleteErrorEvent.h
deleted file mode 100644 (file)
index 7c6b8a5..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef AutocompleteErrorEvent_h
-#define AutocompleteErrorEvent_h
-
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-
-#include "Event.h"
-#include "EventNames.h"
-
-namespace WebCore {
-
-struct AutocompleteErrorEventInit : public EventInit {
-    String reason;
-};
-
-class AutocompleteErrorEvent : public Event {
-public:
-    static PassRefPtr<AutocompleteErrorEvent> create()
-    {
-        return adoptRef(new AutocompleteErrorEvent);
-    }
-
-    static PassRefPtr<AutocompleteErrorEvent> create(const String& reason)
-    {
-        return adoptRef(new AutocompleteErrorEvent(reason));
-    }
-
-    static PassRefPtr<AutocompleteErrorEvent> create(const AtomicString& eventType, const AutocompleteErrorEventInit& initializer)
-    {
-        return adoptRef(new AutocompleteErrorEvent(eventType, initializer));
-    }
-
-    const String& reason() const { return m_reason; }
-
-    virtual const AtomicString& interfaceName() const { return eventNames().interfaceForAutocompleteErrorEvent; }
-
-private:
-    AutocompleteErrorEvent()
-    {
-    }
-
-    AutocompleteErrorEvent(const String& reason)
-        : Event(eventNames().autocompleteerrorEvent, false, false)
-        , m_reason(reason)
-    {
-    }
-
-    AutocompleteErrorEvent(const AtomicString& eventType, const AutocompleteErrorEventInit& initializer)
-        : Event(eventType, initializer)
-        , m_reason(initializer.reason)
-    {
-    }
-
-    String m_reason;
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(REQUEST_AUTOCOMPLETE)
-
-#endif // AutocompleteErrorEvent_h
diff --git a/Source/WebCore/dom/AutocompleteErrorEvent.idl b/Source/WebCore/dom/AutocompleteErrorEvent.idl
deleted file mode 100644 (file)
index 43003e9..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2013 Google Inc. All rights reserved.
- * 
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
- * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
-    Conditional=REQUEST_AUTOCOMPLETE,
-    ConstructorTemplate=Event
-] interface AutocompleteErrorEvent : Event {
-    [InitializedByEventConstructor] readonly attribute DOMString reason;
-};
-
index 601c682..925844b 100644 (file)
@@ -250,9 +250,6 @@ namespace WebCore {
     \
     macro(webkitdeviceproximity) \
     \
-    macro(autocomplete) \
-    macro(autocompleteerror) \
-    \
     macro(webkitprerenderstart) \
     macro(webkitprerenderstop) \
     macro(webkitprerenderload) \
index ebb7a21..b568343 100644 (file)
@@ -55,7 +55,6 @@ MediaKeyEvent conditional=ENCRYPTED_MEDIA
 MediaKeyMessageEvent conditional=ENCRYPTED_MEDIA_V2
 MediaKeyNeededEvent conditional=ENCRYPTED_MEDIA_V2
 TrackEvent conditional=VIDEO_TRACK
-AutocompleteErrorEvent conditional=REQUEST_AUTOCOMPLETE
 CSSFontFaceLoadEvent conditional=FONT_LOAD_EVENTS
 SecurityPolicyViolationEvent conditional=CSP_NEXT
 
index 6c6757d..9626b0c 100644 (file)
@@ -169,8 +169,6 @@ novalidate
 nowrap
 object
 onabort
-onautocomplete
-onautocompleteerror
 onbeforecopy
 onbeforecut
 onbeforeload
index c0f534e..a695123 100644 (file)
@@ -26,7 +26,6 @@
 #include "HTMLFormElement.h"
 
 #include "Attribute.h"
-#include "AutocompleteErrorEvent.h"
 #include "DOMFormData.h"
 #include "DOMWindow.h"
 #include "Document.h"
@@ -77,9 +76,6 @@ HTMLFormElement::HTMLFormElement(const QualifiedName& tagName, Document* documen
     , m_shouldSubmit(false)
     , m_isInResetFunction(false)
     , m_wasDemoted(false)
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-    , m_requestAutocompleteTimer(this, &HTMLFormElement::requestAutocompleteTimerFired)
-#endif
 {
     ASSERT(hasTagName(formTag));
 }
@@ -393,53 +389,6 @@ void HTMLFormElement::reset()
     m_isInResetFunction = false;
 }
 
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-void HTMLFormElement::requestAutocomplete()
-{
-    Frame* frame = document()->frame();
-    if (!frame)
-        return;
-
-    if (!shouldAutocomplete() || !ScriptController::processingUserGesture()) {
-        finishRequestAutocomplete(AutocompleteResultErrorDisabled);
-        return;
-    }
-
-    StringPairVector controlNamesAndValues;
-    getTextFieldValues(controlNamesAndValues);
-    RefPtr<FormState> formState = FormState::create(this, controlNamesAndValues, document(), SubmittedByJavaScript);
-    frame->loader()->client()->didRequestAutocomplete(formState.release());
-}
-
-void HTMLFormElement::finishRequestAutocomplete(AutocompleteResult result)
-{
-    RefPtr<Event> event;
-    if (result == AutocompleteResultSuccess)
-        event = Event::create(eventNames().autocompleteEvent, false, false);
-    else if (result == AutocompleteResultErrorDisabled)
-        event = AutocompleteErrorEvent::create("disabled");
-    else if (result == AutocompleteResultErrorCancel)
-        event = AutocompleteErrorEvent::create("cancel");
-    else if (result == AutocompleteResultErrorInvalid)
-        event = AutocompleteErrorEvent::create("invalid");
-
-    event->setTarget(this);
-    m_pendingAutocompleteEvents.append(event.release());
-
-    // Dispatch events later as this API is meant to work asynchronously in all situations and implementations.
-    if (!m_requestAutocompleteTimer.isActive())
-        m_requestAutocompleteTimer.startOneShot(0);
-}
-
-void HTMLFormElement::requestAutocompleteTimerFired(Timer<HTMLFormElement>*)
-{
-    Vector<RefPtr<Event> > pendingEvents;
-    m_pendingAutocompleteEvents.swap(pendingEvents);
-    for (size_t i = 0; i < pendingEvents.size(); ++i)
-        dispatchEvent(pendingEvents[i].release());
-}
-#endif
-
 void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicString& value)
 {
     if (name == actionAttr)
@@ -458,12 +407,6 @@ void HTMLFormElement::parseAttribute(const QualifiedName& name, const AtomicStri
         else
             document()->unregisterForPageCacheSuspensionCallbacks(this);
     }
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-    else if (name == onautocompleteAttr)
-        setAttributeEventListener(eventNames().autocompleteEvent, createAttributeEventListener(this, name, value));
-    else if (name == onautocompleteerrorAttr)
-        setAttributeEventListener(eventNames().autocompleteerrorEvent, createAttributeEventListener(this, name, value));
-#endif
     else
         HTMLElement::parseAttribute(name, value);
 }
index 760ac99..bd9a252 100644 (file)
@@ -98,21 +98,6 @@ public:
 
     bool checkValidity();
 
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-    enum AutocompleteResult {
-        AutocompleteResultSuccess,
-        AutocompleteResultErrorDisabled,
-        AutocompleteResultErrorCancel,
-        AutocompleteResultErrorInvalid,
-    };
-
-    void requestAutocomplete();
-    void finishRequestAutocomplete(AutocompleteResult);
-
-    DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete);
-    DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror);
-#endif
-
     HTMLFormControlElement* elementForAlias(const AtomicString&);
     void addElementAlias(HTMLFormControlElement*, const AtomicString& alias);
 
@@ -176,13 +161,6 @@ private:
     bool m_isInResetFunction;
 
     bool m_wasDemoted;
-
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-    void requestAutocompleteTimerFired(Timer<HTMLFormElement>*);
-
-    Vector<RefPtr<Event> > m_pendingAutocompleteEvents;
-    Timer<HTMLFormElement> m_requestAutocompleteTimer;
-#endif
 };
 
 } // namespace WebCore
index 77f147a..86a6f74 100644 (file)
 #endif
     void reset();
     boolean checkValidity();
-
-#if defined(ENABLE_REQUEST_AUTOCOMPLETE) && ENABLE_REQUEST_AUTOCOMPLETE
-    void requestAutocomplete();
-    [NotEnumerable] attribute EventListener onautocomplete;
-    [NotEnumerable] attribute EventListener onautocompleteerror;
-#endif
 };
index e6000da..f39efa1 100644 (file)
@@ -184,10 +184,4 @@ PassOwnPtr<ContextMenu> EmptyContextMenuClient::customizeMenu(PassOwnPtr<Context
 #endif
 #endif
 
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-void EmptyFrameLoaderClient::didRequestAutocomplete(PassRefPtr<FormState>)
-{
-}
-#endif
-
 }
index 6ad778c..2357697 100644 (file)
@@ -373,10 +373,6 @@ public:
 #endif
 
     virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext() OVERRIDE;
-
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-    virtual void didRequestAutocomplete(PassRefPtr<FormState>) OVERRIDE;
-#endif
 };
 
 class EmptyTextCheckerClient : public TextCheckerClient {
index 7727ff6..bc9458e 100644 (file)
@@ -337,10 +337,6 @@ namespace WebCore {
         virtual void dispatchWillStartUsingPeerConnectionHandler(RTCPeerConnectionHandler*) { }
 #endif
 
-#if ENABLE(REQUEST_AUTOCOMPLETE)
-        virtual void didRequestAutocomplete(PassRefPtr<FormState>) = 0;
-#endif
-
 #if ENABLE(WEBGL)
         virtual bool allowWebGL(bool enabledPerSettings) { return enabledPerSettings; }
         // Informs the embedder that a WebGL canvas inside this frame received a lost context
index a87cf69..46ec9d7 100644 (file)
     [Conditional=INPUT_SPEECH] attribute SpeechInputEventConstructor SpeechInputEvent;
     [Conditional=WEBGL] attribute WebGLContextEventConstructor WebGLContextEvent;
     [Conditional=PROXIMITY_EVENTS] attribute DeviceProximityEventConstructor DeviceProximityEvent;
-    [Conditional=REQUEST_AUTOCOMPLETE] attribute AutocompleteErrorEventConstructor AutocompleteErrorEvent;
     [Conditional=CSP_NEXT] attribute SecurityPolicyViolationEventConstructor SecurityPolicyViolationEvent;
 
     attribute EventExceptionConstructor EventException;