Enable REQUEST_AUTOCOMPLETE for chromium port
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2012 05:05:25 +0000 (05:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Nov 2012 05:05:25 +0000 (05:05 +0000)
commit693069f0c717950f1454b88cf3873c2b286c9fed
tree2c2e675959fc8713f5adfc893d7300bc485da992
parentaa41d0bba085fef86da740e5c0cb9490ac5bbe29
Enable REQUEST_AUTOCOMPLETE for chromium port
https://bugs.webkit.org/show_bug.cgi?id=101376

Patch by Dan Beam <dbeam@chromium.org> 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 <abarth@webkit.org>'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).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@133720 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/form-request-autocomplete-expected.txt
LayoutTests/fast/forms/form-request-autocomplete.html
LayoutTests/platform/chromium/fast/forms/form-request-autocomplete-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebCore/html/HTMLFormElement.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi
Source/WebKit/chromium/public/WebRuntimeFeatures.h
Source/WebKit/chromium/src/WebRuntimeFeatures.cpp
Tools/ChangeLog
Tools/DumpRenderTree/chromium/TestShell.cpp