Title: [133720] trunk
Revision
133720
Author
[email protected]
Date
2012-11-06 21:05:25 -0800 (Tue, 06 Nov 2012)

Log Message

Enable REQUEST_AUTOCOMPLETE for chromium port
https://bugs.webkit.org/show_bug.cgi?id=101376

Patch by Dan Beam <[email protected]> on 2012-11-06
Reviewed by Adam Barth.

Source/WebCore:

Added a runtime enabled feature to control whether HTMLFormElement#requestAutocomplete is visible from _javascript_.

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures):

Added a binding from RuntimeEnabledFeatures that triggers [V8EnabledAtRuntime=requestAutocomplete].

(WebCore::RuntimeEnabledFeatures::requestAutocompleteEnabled):

Added a getter to WebCore to ask whether the runtime flag requestAutocomplete is on.

(WebCore::RuntimeEnabledFeatures::setRequestAutocompleteEnabled):

Added a setter to WebCore to affect the runtime flag requestAutocomplete.

* html/HTMLFormElement.idl:

Wrapped commonly grouped features in an #if defined(ENABLED_REQUEST_AUTOCOMPLETE) block and added [V8EnableAtRuntime]
so these features can be changed with a command line switch in the chromium port.

Source/WebKit/chromium:

This patch enables the feature flag REQUEST_AUTOCOMPLETE in WebKit/chromium only to allow web authors to start to use
HTMLFormElement#requestAutocomplete as the chrome-side work progresses further.

* features.gypi:

Turned on the *compile* time flag for REQUEST_AUTOCOMPLETE in chromium's webkit port but also added a *run* time flag
that functionally enables the behavior.  This means the chromium port will compile in support but will require a run
time flag to enable.

* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):

Added a method to the public chromium run time features interface to allow chrome to enable/disable this feature.

* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableRequestAutocomplete):
(WebKit):

A setter than can be called from chrome code to change the enable/disable requestAutocomplete and associated events at
runtime.

(WebKit::WebRuntimeFeatures::isRequestAutocompleteEnabled):

A getter that returns whether the requestAutocomplete run time feature is enabled.

Tools:

This patch enables the feature flag REQUEST_AUTOCOMPLETE in WebKit/chromium only to allow web authors to start to use
HTMLFormElement#requestAutocomplete as the chrome-side work progresses further.

* DumpRenderTree/chromium/TestShell.cpp:
(TestShell::TestShell):

Enables the requestAutocomplete runtime feature flag during tests.

LayoutTests:

This patch enables the feature flag REQUEST_AUTOCOMPLETE in WebKit/chromium only to allow web authors to start to use
HTMLFormElement#requestAutocomplete as the chrome-side work progresses further.

* fast/forms/form-request-autocomplete-expected.txt:

Updated to match form-request-autocomplete.html changes.

* fast/forms/form-request-autocomplete.html:

Remove bug number as per Adam Barth <[email protected]>'s advice.

* platform/chromium/fast/forms/form-request-autocomplete-expected.txt: Added.

Adding expected successful layout test for form-request-autocomplete.html tests to chromium specific directory
(as chromium is currently the only place the feature is enabled).

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (133719 => 133720)


--- trunk/LayoutTests/ChangeLog	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/LayoutTests/ChangeLog	2012-11-07 05:05:25 UTC (rev 133720)
@@ -1,3 +1,26 @@
+2012-11-06  Dan Beam  <[email protected]>                                                                                          
+
+        Enable REQUEST_AUTOCOMPLETE for chromium port
+        https://bugs.webkit.org/show_bug.cgi?id=101376
+
+        Reviewed by Adam Barth.
+
+        This patch enables the feature flag REQUEST_AUTOCOMPLETE in WebKit/chromium only to allow web authors to start to use
+        HTMLFormElement#requestAutocomplete as the chrome-side work progresses further.
+
+        * fast/forms/form-request-autocomplete-expected.txt:
+
+        Updated to match form-request-autocomplete.html changes.
+
+        * fast/forms/form-request-autocomplete.html:
+
+        Remove bug number as per Adam Barth <[email protected]>'s advice.
+
+        * platform/chromium/fast/forms/form-request-autocomplete-expected.txt: Added.
+
+        Adding expected successful layout test for form-request-autocomplete.html tests to chromium specific directory
+        (as chromium is currently the only place the feature is enabled).
+
 2012-11-06  Ken Buchanan  <[email protected]>
 
         Crash due to column span under button element

Modified: trunk/LayoutTests/fast/forms/form-request-autocomplete-expected.txt (133719 => 133720)


--- trunk/LayoutTests/fast/forms/form-request-autocomplete-expected.txt	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/LayoutTests/fast/forms/form-request-autocomplete-expected.txt	2012-11-07 05:05:25 UTC (rev 133720)
@@ -1,4 +1,4 @@
-Bug 100557: Implement HTMLFormElement#requestAutocomplete and associated events
+HTMLFormElement#requestAutocomplete and associated events
 
 For this test to pass, you should see all PASSED below.
 

Modified: trunk/LayoutTests/fast/forms/form-request-autocomplete.html (133719 => 133720)


--- trunk/LayoutTests/fast/forms/form-request-autocomplete.html	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/LayoutTests/fast/forms/form-request-autocomplete.html	2012-11-07 05:05:25 UTC (rev 133720)
@@ -70,7 +70,7 @@
 </script>
 </head>
 <body>
-<p> Bug <a href="" Implement HTMLFormElement#requestAutocomplete and associated events </p>
+<p> <a href="" 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>

Added: trunk/LayoutTests/platform/chromium/fast/forms/form-request-autocomplete-expected.txt (0 => 133720)


--- trunk/LayoutTests/platform/chromium/fast/forms/form-request-autocomplete-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium/fast/forms/form-request-autocomplete-expected.txt	2012-11-07 05:05:25 UTC (rev 133720)
@@ -0,0 +1,11 @@
+HTMLFormElement#requestAutocomplete and associated events
+
+For this test to pass, you should see all PASSED below.
+
+PASS no enumerable properties on HTMLFormElement
+PASS no enumerable properties on HTMLFormElement
+PASS got expected number of error events (2)
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/Source/WebCore/ChangeLog (133719 => 133720)


--- trunk/Source/WebCore/ChangeLog	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Source/WebCore/ChangeLog	2012-11-07 05:05:25 UTC (rev 133720)
@@ -1,3 +1,32 @@
+2012-11-06  Dan Beam  <[email protected]>
+
+        Enable REQUEST_AUTOCOMPLETE for chromium port
+        https://bugs.webkit.org/show_bug.cgi?id=101376
+
+        Reviewed by Adam Barth.
+
+        Added a runtime enabled feature to control whether HTMLFormElement#requestAutocomplete is visible from _javascript_.
+
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        (WebCore):
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (RuntimeEnabledFeatures):
+
+        Added a binding from RuntimeEnabledFeatures that triggers [V8EnabledAtRuntime=requestAutocomplete].
+
+        (WebCore::RuntimeEnabledFeatures::requestAutocompleteEnabled):
+
+        Added a getter to WebCore to ask whether the runtime flag requestAutocomplete is on.
+
+        (WebCore::RuntimeEnabledFeatures::setRequestAutocompleteEnabled):
+
+        Added a setter to WebCore to affect the runtime flag requestAutocomplete.
+
+        * html/HTMLFormElement.idl:
+
+        Wrapped commonly grouped features in an #if defined(ENABLED_REQUEST_AUTOCOMPLETE) block and added [V8EnableAtRuntime]
+        so these features can be changed with a command line switch in the chromium port.
+
 2012-11-06  Adam Barth  <[email protected]>
 
         [V8] Unify setJSWrapperForDOMObject and setJSWrapperForDOMNode

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (133719 => 133720)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2012-11-07 05:05:25 UTC (rev 133720)
@@ -241,4 +241,8 @@
 bool RuntimeEnabledFeatures::isDialogElementEnabled = false;
 #endif
 
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+bool RuntimeEnabledFeatures::isRequestAutocompleteEnabled = false;
+#endif
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (133719 => 133720)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2012-11-07 05:05:25 UTC (rev 133720)
@@ -259,6 +259,12 @@
     // 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() { }
@@ -359,6 +365,10 @@
 #if ENABLE(DIALOG_ELEMENT)
     static bool isDialogElementEnabled;
 #endif
+
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+    static bool isRequestAutocompleteEnabled;
+#endif
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/html/HTMLFormElement.idl (133719 => 133720)


--- trunk/Source/WebCore/html/HTMLFormElement.idl	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Source/WebCore/html/HTMLFormElement.idl	2012-11-07 05:05:25 UTC (rev 133720)
@@ -43,7 +43,9 @@
     void reset();
     boolean checkValidity();
 
-    [Conditional=REQUEST_AUTOCOMPLETE] void requestAutocomplete();
-    [NotEnumerable, Conditional=REQUEST_AUTOCOMPLETE] attribute EventListener onautocomplete;
-    [NotEnumerable, Conditional=REQUEST_AUTOCOMPLETE] attribute EventListener onautocompleteerror;
+#if defined(ENABLE_REQUEST_AUTOCOMPLETE) && ENABLE_REQUEST_AUTOCOMPLETE
+    [V8EnabledAtRuntime=requestAutocomplete] void requestAutocomplete();
+    [V8EnabledAtRuntime=requestAutocomplete,NotEnumerable] attribute EventListener onautocomplete;
+    [V8EnabledAtRuntime=requestAutocomplete,NotEnumerable] attribute EventListener onautocompleteerror;
+#endif
 };

Modified: trunk/Source/WebKit/chromium/ChangeLog (133719 => 133720)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-11-07 05:05:25 UTC (rev 133720)
@@ -1,3 +1,35 @@
+2012-11-06  Dan Beam  <[email protected]>
+
+        Enable REQUEST_AUTOCOMPLETE for chromium port
+        https://bugs.webkit.org/show_bug.cgi?id=101376
+
+        Reviewed by Adam Barth.
+
+        This patch enables the feature flag REQUEST_AUTOCOMPLETE in WebKit/chromium only to allow web authors to start to use
+        HTMLFormElement#requestAutocomplete as the chrome-side work progresses further.
+
+        * features.gypi:
+
+        Turned on the *compile* time flag for REQUEST_AUTOCOMPLETE in chromium's webkit port but also added a *run* time flag
+        that functionally enables the behavior.  This means the chromium port will compile in support but will require a run
+        time flag to enable.
+
+        * public/WebRuntimeFeatures.h:
+        (WebRuntimeFeatures):
+
+        Added a method to the public chromium run time features interface to allow chrome to enable/disable this feature.
+
+        * src/WebRuntimeFeatures.cpp:
+        (WebKit::WebRuntimeFeatures::enableRequestAutocomplete):
+        (WebKit):
+
+        A setter than can be called from chrome code to change the enable/disable requestAutocomplete and associated events at
+        runtime.
+
+        (WebKit::WebRuntimeFeatures::isRequestAutocompleteEnabled):
+
+        A getter that returns whether the requestAutocomplete run time feature is enabled.
+
 2012-11-06  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r133526.

Modified: trunk/Source/WebKit/chromium/features.gypi (133719 => 133720)


--- trunk/Source/WebKit/chromium/features.gypi	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Source/WebKit/chromium/features.gypi	2012-11-07 05:05:25 UTC (rev 133720)
@@ -98,6 +98,7 @@
       'ENABLE_QUOTA=1',
       'ENABLE_RESOLUTION_MEDIA_QUERY=0',
       'ENABLE_REQUEST_ANIMATION_FRAME=1',
+      'ENABLE_REQUEST_AUTOCOMPLETE=1',
       'ENABLE_RUBY=1',
       'ENABLE_SANDBOX=1',
       'ENABLE_SCRIPTED_SPEECH=1',

Modified: trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h (133719 => 133720)


--- trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2012-11-07 05:05:25 UTC (rev 133720)
@@ -159,6 +159,9 @@
     WEBKIT_EXPORT static void enableCSSExclusions(bool);
     WEBKIT_EXPORT static bool isCSSExclusionsEnabled();
 
+    WEBKIT_EXPORT static void enableRequestAutocomplete(bool);
+    WEBKIT_EXPORT static bool isRequestAutocompleteEnabled();
+
 private:
     WebRuntimeFeatures();
 };

Modified: trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp (133719 => 133720)


--- trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2012-11-07 05:05:25 UTC (rev 133720)
@@ -657,4 +657,22 @@
     return RuntimeEnabledFeatures::cssExclusionsEnabled();
 }
 
+void WebRuntimeFeatures::enableRequestAutocomplete(bool enable)
+{
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+    RuntimeEnabledFeatures::setRequestAutocompleteEnabled(enable);
+#else
+    UNUSED_PARAM(enable);
+#endif
+}
+
+bool WebRuntimeFeatures::isRequestAutocompleteEnabled()
+{
+#if ENABLE(REQUEST_AUTOCOMPLETE)
+    return RuntimeEnabledFeatures::requestAutocompleteEnabled();
+#else
+    return false;
+#endif
+}
+
 } // namespace WebKit

Modified: trunk/Tools/ChangeLog (133719 => 133720)


--- trunk/Tools/ChangeLog	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Tools/ChangeLog	2012-11-07 05:05:25 UTC (rev 133720)
@@ -1,3 +1,18 @@
+2012-11-06  Dan Beam  <[email protected]>
+
+        Enable REQUEST_AUTOCOMPLETE for chromium port
+        https://bugs.webkit.org/show_bug.cgi?id=101376
+
+        Reviewed by Adam Barth.
+
+        This patch enables the feature flag REQUEST_AUTOCOMPLETE in WebKit/chromium only to allow web authors to start to use
+        HTMLFormElement#requestAutocomplete as the chrome-side work progresses further.
+
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::TestShell):
+
+        Enables the requestAutocomplete runtime feature flag during tests.
+
 2012-11-06  KyungTae Kim  <[email protected]>
 
         [WK2][EFL] Add shortcut for setting a pagination mode on Minibrowser

Modified: trunk/Tools/DumpRenderTree/chromium/TestShell.cpp (133719 => 133720)


--- trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-11-07 04:59:58 UTC (rev 133719)
+++ trunk/Tools/DumpRenderTree/chromium/TestShell.cpp	2012-11-07 05:05:25 UTC (rev 133720)
@@ -146,6 +146,7 @@
     WebRuntimeFeatures::enableShadowDOM(true);
     WebRuntimeFeatures::enableStyleScoped(true);
     WebRuntimeFeatures::enableScriptedSpeech(true);
+    WebRuntimeFeatures::enableRequestAutocomplete(true);
 
     // 30 second is the same as the value in Mac DRT.
     // If we use a value smaller than the timeout value of
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to