[WebAuthN] Add a runtime flag for local authenticator
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2018 23:54:48 +0000 (23:54 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2018 23:54:48 +0000 (23:54 +0000)
commitef7d8befd8fea34f75ed845c8b4fb9fa810e847b
tree08c977300a1ef60a8fee0ad2476b2f92d2a2c58d
parentb792cbe945cd2959410feb8a1d564675a1c187da
[WebAuthN] Add a runtime flag for local authenticator
https://bugs.webkit.org/show_bug.cgi?id=192792
<rdar://problem/46798738>

Reviewed by Brent Fulgham.

Source/WebCore:

No tests.

This patch adds a runtime flag for local authenticator and removes ways to
set the runtime flag for web authentication in LegacyWebKit.

* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::setWebAuthenticationLocalAuthenticatorEnabled):
(WebCore::RuntimeEnabledFeatures::webAuthenticationLocalAuthenticatorEnabled const):

Source/WebKit:

* Shared/WebPreferences.yaml:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetWebAuthenticationLocalAuthenticatorEnabled):
(WKPreferencesGetWebAuthenticationLocalAuthenticatorEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/WebAuthentication/Cocoa/LocalService.mm:
(WebKit::LocalService::isAvailable):

Source/WebKitLegacy/mac:

* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
(-[WebPreferences webAuthenticationEnabled]): Deleted.
(-[WebPreferences setWebAuthenticationEnabled:]): Deleted.
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Tools:

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

LayoutTests:

* platform/mac-highsierra-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
* platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac-highsierra-wk1/fast/dom/navigator-detached-no-crash-expected.txt
LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/page/RuntimeEnabledFeatures.h
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPreferences.yaml
Source/WebKit/UIProcess/API/C/WKPreferences.cpp
Source/WebKit/UIProcess/API/C/WKPreferencesRefPrivate.h
Source/WebKit/UIProcess/WebAuthentication/Cocoa/LocalService.mm
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKitLegacy/mac/WebView/WebPreferences.mm
Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h
Source/WebKitLegacy/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/DumpRenderTree/TestOptions.cpp
Tools/DumpRenderTree/TestOptions.h
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestOptions.h