Guard Credential Management implementation behind a runtime enabled feature flag
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Mar 2017 22:40:25 +0000 (22:40 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 9 Mar 2017 22:40:25 +0000 (22:40 +0000)
commit6e39d568c005e9a392f3bf4b69b8ca8ca5e17e54
tree100a79c2c6e9a37c1abcef07f1135a291e472fdc
parent622862cd23141d34c88b6bfdcca7e8703507e9c5
Guard Credential Management implementation behind a runtime enabled feature flag
https://bugs.webkit.org/show_bug.cgi?id=169364
<rdar://problem/30957425>

Reviewed by Brent Fulgham.

Source/JavaScriptCore:

Add common identifiers for Credential, PasswordCredential, and SiteBoundCredential that are
needed to guard these interfaces behind a runtime enabled feature flag.

* runtime/CommonIdentifiers.h:

Source/WebCore:

Add a runtime enabled feature flag for Credential Management (disabled by default).
Once we are happy with this feature we can enable the feature by default or remove the
the runtime enabled feature flag so as to enable it by default.

* Modules/credentials/BasicCredential.idl: Enable only if the runtime enabled feature flag is
 enabled.
* Modules/credentials/PasswordCredential.idl: Ditto.
* Modules/credentials/SiteBoundCredential.idl: Ditto.
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setCredentialManagementEnabled): Added.
(WebCore::RuntimeEnabledFeatures::credentialManagementEnabled): Added.

Source/WebKit/mac:

Add WebKit preference for Credential Management (disabled by default).

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences credentialManagementEnabled]): Added.
(-[WebPreferences setCredentialManagementEnabled:]): Added.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

Add WebKit2 preference for Credential Management (disabled by default).

* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCredentialManagementEnabled): Added.
(WKPreferencesGetCredentialManagementEnabled): Added.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

Add a new test option header, enableCredentialManagement, to DumpRenderTree/WebKitTestRunner
to enable Credential Management.

* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:

LayoutTests:

* credentials/idlharness.html: Use comment header to enable Credential Management API.
* platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt: Update expected results now
that we no longer expose the Credential Management API by default.
* platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt: Ditto.
* platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt: Ditto.
* platform/mac/js/dom/global-constructors-attributes-expected.txt: Ditto.
* platform/win/TestExpectations: For now, skip the Credential Management API tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@213676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
30 files changed:
LayoutTests/ChangeLog
LayoutTests/credentials/idlharness.html
LayoutTests/platform/mac-elcapitan/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-wk1/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac-yosemite/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/mac/js/dom/global-constructors-attributes-expected.txt
LayoutTests/platform/win/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/CommonIdentifiers.h
Source/WebCore/ChangeLog
Source/WebCore/Modules/credentials/BasicCredential.idl
Source/WebCore/Modules/credentials/PasswordCredential.idl
Source/WebCore/Modules/credentials/SiteBoundCredential.idl
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPreferencesDefinitions.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Tools/ChangeLog
Tools/DumpRenderTree/TestOptions.h
Tools/DumpRenderTree/TestOptions.mm
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestOptions.h