Diff
Modified: trunk/LayoutTests/ChangeLog (226331 => 226332)
--- trunk/LayoutTests/ChangeLog 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/ChangeLog 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,3 +1,33 @@
+2018-01-02 Jiewen Tan <jiewen_...@apple.com>
+
+ Update Credential Management API for WebAuthentication
+ https://bugs.webkit.org/show_bug.cgi?id=181082
+ <rdar://problem/36055239>
+
+ Reviewed by Brent Fulgham.
+
+ This patch moves original tests for Credential Management API to http/wpt/ to better integrate
+ with web-platform-tests infrastructure. Hopefully this will help us later on contribute tests
+ back to W3C.
+
+ * credentials/idlharness-expected.txt: Removed.
+ * credentials/idlharness.html: Removed.
+ * fast/dom/navigator-detached-no-crash-expected.txt:
+ * http/wpt/credential-management/credentialscontainer-create-basics.https-expected.txt: Added.
+ * http/wpt/credential-management/credentialscontainer-create-basics.https.html: Added.
+ * http/wpt/credential-management/credentialscontainer-get-basics.https-expected.txt: Added.
+ * http/wpt/credential-management/credentialscontainer-get-basics.https.html: Added.
+ * http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https-expected.txt: Added.
+ * http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html: Added.
+ * http/wpt/credential-management/idl.https-expected.txt: Added.
+ * http/wpt/credential-management/idl.https.html: Added.
+ * platform/gtk/TestExpectations:
+ * platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt:
+ * platform/mac-elcapitan-wk2/fast/dom/navigator-detached-no-crash-expected.txt:
+ * platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
+ * platform/win/TestExpectations:
+ * platform/win/fast/dom/navigator-detached-no-crash-expected.txt:
+
2018-01-02 Ms2ger <ms2...@igalia.com>
Remove obsolete expectations for updated imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html.
Modified: trunk/LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt (226331 => 226332)
--- trunk/LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -5,6 +5,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
@@ -27,6 +28,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
Added: trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-create-basics.https-expected.txt (0 => 226332)
--- trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-create-basics.https-expected.txt (rev 0)
+++ trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-create-basics.https-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,8 @@
+
+PASS navigator.credentials.create() with no argument.
+PASS navigator.credentials.create() with empty argument.
+FAIL navigator.credentials.create() with bogus publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+PASS navigator.credentials.create() with bogus data
+PASS navigator.credentials.create() with abort signal set
+PASS navigator.credentials.create() with faked data
+
Added: trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-create-basics.https.html (0 => 226332)
--- trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-create-basics.https.html (rev 0)
+++ trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-create-basics.https.html 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Credential Management API: create() basics.</title>
+<script src=""
+<script src=""
+<script>
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.create());
+}, "navigator.credentials.create() with no argument.");
+
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.create({ }));
+}, "navigator.credentials.create() with empty argument.");
+
+promise_test(function(t) {
+ return promise_rejects(t, new TypeError(),
+ navigator.credentials.create({publicKey: "bogus publicKey data"}));
+}, "navigator.credentials.create() with bogus publicKey data");
+
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.create({bogus_key: "bogus data"}));
+}, "navigator.credentials.create() with bogus data");
+
+promise_test(function(t) {
+ var controller = new AbortController();
+ var options = { signal: controller.signal };
+
+ controller.abort();
+ return promise_rejects(t, "AbortError",
+ navigator.credentials.create(options));
+}, "navigator.credentials.create() with abort signal set");
+
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.create({publicKey: true}));
+}, "navigator.credentials.create() with faked data");
+</script>
Added: trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-get-basics.https-expected.txt (0 => 226332)
--- trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-get-basics.https-expected.txt (rev 0)
+++ trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-get-basics.https-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,8 @@
+
+PASS navigator.credentials.get() with no argument.
+PASS navigator.credentials.get() with empty argument.
+FAIL navigator.credentials.get() with bogus publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+PASS navigator.credentials.get() with bogus data
+PASS navigator.credentials.get() with abort signal set
+PASS navigator.credentials.get() with faked data
+
Added: trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-get-basics.https.html (0 => 226332)
--- trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-get-basics.https.html (rev 0)
+++ trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-get-basics.https.html 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<title>Credential Management API: get() basics.</title>
+<script src=""
+<script src=""
+<script>
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.get());
+}, "navigator.credentials.get() with no argument.");
+
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.get({ }));
+}, "navigator.credentials.get() with empty argument.");
+
+promise_test(function(t) {
+ return promise_rejects(t, new TypeError(),
+ navigator.credentials.get({publicKey: "bogus publicKey data"}));
+}, "navigator.credentials.get() with bogus publicKey data");
+
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.get({bogus_key: "bogus data"}));
+}, "navigator.credentials.get() with bogus data");
+
+promise_test(function(t) {
+ var controller = new AbortController();
+ var options = { signal: controller.signal };
+
+ controller.abort();
+ return promise_rejects(t, "AbortError",
+ navigator.credentials.get(options));
+}, "navigator.credentials.get() with abort signal set");
+
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.get({publicKey: true}));
+}, "navigator.credentials.get() with faked data");
+</script>
Added: trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https-expected.txt (0 => 226332)
--- trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https-expected.txt (rev 0)
+++ trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,3 @@
+
+PASS navigator.credentials.preventSilentAccess().
+
Added: trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html (0 => 226332)
--- trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html (rev 0)
+++ trunk/LayoutTests/http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<title>Credential Management API: preventSilentAccess() basics.</title>
+<script src=""
+<script src=""
+<script>
+promise_test(function(t) {
+ return promise_rejects(t, "NotSupportedError",
+ navigator.credentials.preventSilentAccess());
+}, "navigator.credentials.preventSilentAccess().");
+</script>
Added: trunk/LayoutTests/http/wpt/credential-management/idl.https-expected.txt (0 => 226332)
--- trunk/LayoutTests/http/wpt/credential-management/idl.https-expected.txt (rev 0)
+++ trunk/LayoutTests/http/wpt/credential-management/idl.https-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,20 @@
+
+PASS CredentialsContainer interface: existence and properties of interface object
+PASS CredentialsContainer interface object length
+PASS CredentialsContainer interface object name
+PASS CredentialsContainer interface: existence and properties of interface prototype object
+PASS CredentialsContainer interface: existence and properties of interface prototype object's "constructor" property
+PASS CredentialsContainer interface: operation get(CredentialRequestOptions)
+PASS CredentialsContainer interface: operation store(Credential)
+PASS CredentialsContainer interface: operation create(CredentialCreationOptions)
+PASS CredentialsContainer interface: operation preventSilentAccess()
+PASS CredentialsContainer must be primary interface of navigator.credentials
+PASS Stringification of navigator.credentials
+PASS CredentialsContainer interface: navigator.credentials must inherit property "get(CredentialRequestOptions)" with the proper type
+PASS CredentialsContainer interface: calling get(CredentialRequestOptions) on navigator.credentials with too few arguments must throw TypeError
+PASS CredentialsContainer interface: navigator.credentials must inherit property "store(Credential)" with the proper type
+PASS CredentialsContainer interface: calling store(Credential) on navigator.credentials with too few arguments must throw TypeError
+PASS CredentialsContainer interface: navigator.credentials must inherit property "create(CredentialCreationOptions)" with the proper type
+PASS CredentialsContainer interface: calling create(CredentialCreationOptions) on navigator.credentials with too few arguments must throw TypeError
+PASS CredentialsContainer interface: navigator.credentials must inherit property "preventSilentAccess()" with the proper type
+
Added: trunk/LayoutTests/http/wpt/credential-management/idl.https.html (0 => 226332)
--- trunk/LayoutTests/http/wpt/credential-management/idl.https.html (rev 0)
+++ trunk/LayoutTests/http/wpt/credential-management/idl.https.html 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<script src=""
+<script src=""
+<script src=""
+<script src=""
+<script type="text/plain" id="untested">
+ dictionary CredentialData {
+ USVString id;
+ };
+
+ [Exposed=Window, SecureContext]
+ interface Credential {
+ readonly attribute USVString id;
+ readonly attribute DOMString type;
+ };
+
+ dictionary CredentialCreationOptions {
+ AbortSignal signal;
+ };
+
+ enum CredentialMediationRequirement {
+ "silent",
+ "optional",
+ "required"
+ };
+
+ dictionary CredentialRequestOptions {
+ CredentialMediationRequirement mediation = "optional";
+ AbortSignal signal;
+ };
+</script>
+<script type="text/plain" id="tested">
+ [Exposed=Window, SecureContext]
+ interface CredentialsContainer {
+ Promise<Credential?> get(optional CredentialRequestOptions options);
+ Promise<Credential> store(Credential credential);
+ Promise<Credential?> create(optional CredentialCreationOptions options);
+ Promise<void> preventSilentAccess();
+ };
+</script>
+<script>
+ "use strict";
+ var idl_array = new IdlArray();
+ idl_array.add_untested_idls(document.querySelector('#untested').textContent);
+ idl_array.add_idls(document.querySelector('#tested').textContent);
+ idl_array.add_objects({
+ CredentialsContainer: ['navigator.credentials'],
+ });
+ idl_array.test();
+</script>
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (226331 => 226332)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,3 +1,14 @@
+2018-01-02 Jiewen Tan <jiewen_...@apple.com>
+
+ Update Credential Management API for WebAuthentication
+ https://bugs.webkit.org/show_bug.cgi?id=181082
+ <rdar://problem/36055239>
+
+ Reviewed by Brent Fulgham.
+
+ * web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt:
+ * web-platform-tests/credential-management/idl.https-expected.txt:
+
2018-01-02 Ms2ger <ms2...@igalia.com>
Update imported/w3c/web-platform-tests/html/browsers/windows/browsing-context.html from upstream wpt.
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt (226331 => 226332)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/credential-management/credentialscontainer-create-basics.https-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,17 +1,17 @@
-FAIL navigator.credentials.create() with no argument. undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with empty argument. undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with valid PasswordCredentialData undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with valid HTMLFormElement undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with bogus password data undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with valid FederatedCredentialData undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with bogus federated data undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with bogus publicKey data undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() returns PublicKeyCredential undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with both PasswordCredentialData and FederatedCredentialData undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with bogus password and federated data undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with bogus federated and publicKey data undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with bogus password and publicKey data undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with bogus password, federated, and publicKey data undefined is not an object (evaluating 'navigator.credentials.create')
-FAIL navigator.credentials.create() with bogus data undefined is not an object (evaluating 'navigator.credentials.create')
+PASS navigator.credentials.create() with no argument.
+PASS navigator.credentials.create() with empty argument.
+FAIL navigator.credentials.create() with valid PasswordCredentialData promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
+FAIL navigator.credentials.create() with valid HTMLFormElement promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
+FAIL navigator.credentials.create() with bogus password data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+FAIL navigator.credentials.create() with valid FederatedCredentialData promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
+FAIL navigator.credentials.create() with bogus federated data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+FAIL navigator.credentials.create() with bogus publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+FAIL navigator.credentials.create() returns PublicKeyCredential promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
+PASS navigator.credentials.create() with both PasswordCredentialData and FederatedCredentialData
+FAIL navigator.credentials.create() with bogus password and federated data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+FAIL navigator.credentials.create() with bogus federated and publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+FAIL navigator.credentials.create() with bogus password and publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+FAIL navigator.credentials.create() with bogus password, federated, and publicKey data assert_throws: function "function () { throw e }" threw object "NotSupportedError: The operation is not supported." ("NotSupportedError") expected object "TypeError" ("TypeError")
+PASS navigator.credentials.create() with bogus data
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/credential-management/idl.https-expected.txt (226331 => 226332)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/credential-management/idl.https-expected.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/credential-management/idl.https-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,22 +1,22 @@
-FAIL CredentialsContainer interface: existence and properties of interface object assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer interface object length assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer interface object name assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer interface: existence and properties of interface prototype object assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer interface: existence and properties of interface prototype object's "constructor" property assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer interface: operation get(CredentialRequestOptions) assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer interface: operation store(Credential) assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer interface: operation create(CredentialCreationOptions) assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer interface: operation preventSilentAccess() assert_own_property: self does not have own property "CredentialsContainer" expected property "CredentialsContainer" missing
-FAIL CredentialsContainer must be primary interface of navigator.credentials assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL Stringification of navigator.credentials assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL CredentialsContainer interface: navigator.credentials must inherit property "get(CredentialRequestOptions)" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL CredentialsContainer interface: calling get(CredentialRequestOptions) on navigator.credentials with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL CredentialsContainer interface: navigator.credentials must inherit property "store(Credential)" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL CredentialsContainer interface: calling store(Credential) on navigator.credentials with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL CredentialsContainer interface: navigator.credentials must inherit property "create(CredentialCreationOptions)" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL CredentialsContainer interface: calling create(CredentialCreationOptions) on navigator.credentials with too few arguments must throw TypeError assert_equals: wrong typeof object expected "object" but got "undefined"
-FAIL CredentialsContainer interface: navigator.credentials must inherit property "preventSilentAccess()" with the proper type assert_equals: wrong typeof object expected "object" but got "undefined"
+PASS CredentialsContainer interface: existence and properties of interface object
+PASS CredentialsContainer interface object length
+PASS CredentialsContainer interface object name
+PASS CredentialsContainer interface: existence and properties of interface prototype object
+PASS CredentialsContainer interface: existence and properties of interface prototype object's "constructor" property
+PASS CredentialsContainer interface: operation get(CredentialRequestOptions)
+PASS CredentialsContainer interface: operation store(Credential)
+PASS CredentialsContainer interface: operation create(CredentialCreationOptions)
+PASS CredentialsContainer interface: operation preventSilentAccess()
+PASS CredentialsContainer must be primary interface of navigator.credentials
+PASS Stringification of navigator.credentials
+PASS CredentialsContainer interface: navigator.credentials must inherit property "get(CredentialRequestOptions)" with the proper type
+PASS CredentialsContainer interface: calling get(CredentialRequestOptions) on navigator.credentials with too few arguments must throw TypeError
+PASS CredentialsContainer interface: navigator.credentials must inherit property "store(Credential)" with the proper type
+PASS CredentialsContainer interface: calling store(Credential) on navigator.credentials with too few arguments must throw TypeError
+PASS CredentialsContainer interface: navigator.credentials must inherit property "create(CredentialCreationOptions)" with the proper type
+PASS CredentialsContainer interface: calling create(CredentialCreationOptions) on navigator.credentials with too few arguments must throw TypeError
+PASS CredentialsContainer interface: navigator.credentials must inherit property "preventSilentAccess()" with the proper type
FAIL PasswordCredential interface: existence and properties of interface object assert_own_property: self does not have own property "PasswordCredential" expected property "PasswordCredential" missing
FAIL PasswordCredential interface object length assert_own_property: self does not have own property "PasswordCredential" expected property "PasswordCredential" missing
FAIL PasswordCredential interface object name assert_own_property: self does not have own property "PasswordCredential" expected property "PasswordCredential" missing
Modified: trunk/LayoutTests/platform/gtk/TestExpectations (226331 => 226332)
--- trunk/LayoutTests/platform/gtk/TestExpectations 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/platform/gtk/TestExpectations 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1534,7 +1534,6 @@
Bug(GTK) fast/writing-mode/japanese-ruby-horizontal-bt.html [ Failure Pass ]
Bug(GTK) fast/writing-mode/japanese-ruby-vertical-lr.html [ Failure Pass ]
Bug(GTK) fast/writing-mode/japanese-ruby-vertical-rl.html [ Failure Pass ]
-Bug(GTK) credentials/idlharness.html [ Failure Pass ]
webkit.org/b/131533 media/track/track-remove-active-cue-crash.html [ Timeout Pass ]
webkit.org/b/131934 fast/dom/Window/mozilla-focus-blur.html [ Failure Timeout Pass ]
Modified: trunk/LayoutTests/platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt (226331 => 226332)
--- trunk/LayoutTests/platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/platform/gtk/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -5,6 +5,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
@@ -23,6 +24,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
Modified: trunk/LayoutTests/platform/mac-elcapitan-wk2/fast/dom/navigator-detached-no-crash-expected.txt (226331 => 226332)
--- trunk/LayoutTests/platform/mac-elcapitan-wk2/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/platform/mac-elcapitan-wk2/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -5,6 +5,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
@@ -26,6 +27,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
Modified: trunk/LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt (226331 => 226332)
--- trunk/LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -5,6 +5,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
@@ -25,6 +26,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
Modified: trunk/LayoutTests/platform/win/TestExpectations (226331 => 226332)
--- trunk/LayoutTests/platform/win/TestExpectations 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/platform/win/TestExpectations 2018-01-02 20:28:31 UTC (rev 226332)
@@ -627,7 +627,7 @@
webkit.org/b/158836 imported/w3c/web-platform-tests/encrypted-media [ Skip ]
# Credential Management not supported
-credentials/ [ Skip ]
+http/wpt/credential-management/ [ Skip ]
# UIScriptController::zoomToScale is not implemented on Windows.
webkit.org/b/180424 fast/visual-viewport/rtl-zoomed-rects.html [ Skip ]
Modified: trunk/LayoutTests/platform/win/fast/dom/navigator-detached-no-crash-expected.txt (226331 => 226332)
--- trunk/LayoutTests/platform/win/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/LayoutTests/platform/win/fast/dom/navigator-detached-no-crash-expected.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -5,6 +5,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
@@ -24,6 +25,7 @@
navigator.appName is OK
navigator.appVersion is OK
navigator.cookieEnabled is OK
+navigator.credentials is OK
navigator.getStorageUpdates() is OK
navigator.javaEnabled() is OK
navigator.language is OK
Modified: trunk/Source/WebCore/CMakeLists.txt (226331 => 226332)
--- trunk/Source/WebCore/CMakeLists.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/CMakeLists.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -46,6 +46,7 @@
"${WEBCORE_DIR}/Modules/speech"
"${WEBCORE_DIR}/Modules/streams"
"${WEBCORE_DIR}/Modules/webaudio"
+ "${WEBCORE_DIR}/Modules/webauthn"
"${WEBCORE_DIR}/Modules/webdatabase"
"${WEBCORE_DIR}/Modules/webdriver"
"${WEBCORE_DIR}/Modules/websockets"
@@ -397,6 +398,8 @@
Modules/webaudio/ScriptProcessorNode.idl
Modules/webaudio/WaveShaperNode.idl
+ Modules/webauthn/PublicKeyCredential.idl
+
Modules/webdatabase/DOMWindowWebDatabase.idl
Modules/webdatabase/Database.idl
Modules/webdatabase/DatabaseCallback.idl
Modified: trunk/Source/WebCore/ChangeLog (226331 => 226332)
--- trunk/Source/WebCore/ChangeLog 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/ChangeLog 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,3 +1,64 @@
+2018-01-02 Jiewen Tan <jiewen_...@apple.com>
+
+ Update Credential Management API for WebAuthentication
+ https://bugs.webkit.org/show_bug.cgi?id=181082
+ <rdar://problem/36055239>
+
+ Reviewed by Brent Fulgham.
+
+ Part 2/2
+
+ This patch implements Core API from Credential Management API: https://www.w3.org/TR/credential-management-1/#core.
+ which is required by WebAuthN. It also sets the CredentialManagement runtime flag to enable testing. Note that it
+ introduces a dummy PublicKeyCredential interface for testing functionalities of the Credential interface, which
+ cannot be instantiated.
+
+ Tests: http/wpt/credential-management/credentialscontainer-create-basics.https.html
+ http/wpt/credential-management/credentialscontainer-get-basics.https.html
+ http/wpt/credential-management/credentialscontainer-preventSilentAccess-basics.https.html
+ http/wpt/credential-management/idl.https.html
+
+ * CMakeLists.txt:
+ * DerivedSources.make:
+ * Modules/credentialmanagement/BasicCredential.cpp:
+ (WebCore::BasicCredential::BasicCredential):
+ (WebCore::BasicCredential::type const):
+ * Modules/credentialmanagement/BasicCredential.h:
+ (WebCore::BasicCredential::discovery const):
+ * Modules/credentialmanagement/BasicCredential.idl:
+ * Modules/credentialmanagement/CredentialCreationOptions.h:
+ * Modules/credentialmanagement/CredentialCreationOptions.idl:
+ * Modules/credentialmanagement/CredentialRequestOptions.h:
+ * Modules/credentialmanagement/CredentialRequestOptions.idl:
+ * Modules/credentialmanagement/CredentialsContainer.cpp:
+ (WebCore::CredentialsContainer::CredentialsContainer):
+ (WebCore::CredentialsContainer::isSameOriginWithItsAncestors):
+ (WebCore::CredentialsContainer::dispatchTask):
+ (WebCore::CredentialsContainer::get):
+ (WebCore::CredentialsContainer::store):
+ (WebCore::CredentialsContainer::isCreate):
+ (WebCore::CredentialsContainer::preventSilentAccess):
+ * Modules/credentialmanagement/CredentialsContainer.h:
+ (WebCore::CredentialsContainer::create):
+ (WebCore::CredentialsContainer::CredentialsContainer): Deleted.
+ * Modules/credentialmanagement/CredentialsContainer.idl:
+ * Modules/credentialmanagement/NavigatorCredentials.cpp:
+ (WebCore::NavigatorCredentials::credentials):
+ * Modules/credentialmanagement/NavigatorCredentials.h:
+ * Modules/credentialmanagement/NavigatorCredentials.idl:
+ * Modules/webauthn/PublicKeyCredential.cpp: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
+ (WebCore::PublicKeyCredential::PublicKeyCredential):
+ (WebCore::PublicKeyCredential::collectFromCredentialStore):
+ (WebCore::PublicKeyCredential::discoverFromExternalSource):
+ (WebCore::PublicKeyCredential::store):
+ (WebCore::PublicKeyCredential::create):
+ * Modules/webauthn/PublicKeyCredential.h: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp.
+ * Modules/webauthn/PublicKeyCredential.idl: Copied from Source/WebCore/Modules/credentialmanagement/BasicCredential.idl.
+ * Sources.txt:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/WebCoreBuiltinNames.h:
+ * page/RuntimeEnabledFeatures.h:
+
2018-01-02 Oleksandr Skachkov <gskach...@gmail.com>
WebAssembly: sending module to iframe fails
Modified: trunk/Source/WebCore/DerivedSources.make (226331 => 226332)
--- trunk/Source/WebCore/DerivedSources.make 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/DerivedSources.make 2018-01-02 20:28:31 UTC (rev 226332)
@@ -54,6 +54,7 @@
$(WebCore)/Modules/speech \
$(WebCore)/Modules/streams \
$(WebCore)/Modules/webaudio \
+ $(WebCore)/Modules/webauthn \
$(WebCore)/Modules/webdatabase \
$(WebCore)/Modules/webdriver \
$(WebCore)/Modules/websockets \
@@ -323,6 +324,7 @@
$(WebCore)/Modules/webaudio/PeriodicWave.idl \
$(WebCore)/Modules/webaudio/ScriptProcessorNode.idl \
$(WebCore)/Modules/webaudio/WaveShaperNode.idl \
+ $(WebCore)/Modules/webauthn/PublicKeyCredential.idl \
$(WebCore)/Modules/webdatabase/DOMWindowWebDatabase.idl \
$(WebCore)/Modules/webdatabase/Database.idl \
$(WebCore)/Modules/webdatabase/DatabaseCallback.idl \
Modified: trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp 2018-01-02 20:28:31 UTC (rev 226332)
@@ -28,9 +28,10 @@
namespace WebCore {
-BasicCredential::BasicCredential(const String& id, Type type)
+BasicCredential::BasicCredential(const String& id, Type type, Discovery discovery)
: m_id(id)
, m_type(type)
+ , m_discovery(discovery)
{
}
@@ -39,10 +40,8 @@
String BasicCredential::type() const
{
switch (m_type) {
- case Type::Password:
- return ASCIILiteral("password");
- case Type::Federated:
- return ASCIILiteral("federated");
+ case Type::PublicKey:
+ return ASCIILiteral("public-key");
}
ASSERT_NOT_REACHED();
Modified: trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.h (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.h 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -25,29 +25,35 @@
#pragma once
-#include <wtf/RefCounted.h>
+#include <wtf/ThreadSafeRefCounted.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
-class BasicCredential : public RefCounted<BasicCredential> {
+class BasicCredential : public ThreadSafeRefCounted<BasicCredential> {
public:
enum class Type {
- Password,
- Federated,
+ PublicKey,
};
+ enum class Discovery {
+ CredentialStore,
+ Remote,
+ };
+
virtual ~BasicCredential();
const String& id() const { return m_id; }
String type() const;
+ Discovery discovery() const { return m_discovery; }
protected:
- BasicCredential(const String&, Type);
+ BasicCredential(const String&, Type, Discovery);
private:
String m_id;
Type m_type;
+ Discovery m_discovery;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.idl (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.idl 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.idl 2018-01-02 20:28:31 UTC (rev 226332)
@@ -27,6 +27,7 @@
InterfaceName=Credential,
EnabledAtRuntime=CredentialManagement,
Exposed=Window,
+ SecureContext
] interface BasicCredential {
readonly attribute USVString id;
readonly attribute DOMString type;
Modified: trunk/Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,9 +26,15 @@
#pragma once
+#include <wtf/RefCounted.h>
+
namespace WebCore {
+class AbortSignal;
+
struct CredentialCreationOptions {
+ RefPtr<AbortSignal> signal;
+ std::optional<bool> publicKey;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.idl (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.idl 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/CredentialCreationOptions.idl 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -24,4 +25,6 @@
*/
dictionary CredentialCreationOptions {
+ AbortSignal signal;
+ boolean publicKey; // fake for now
};
Modified: trunk/Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,12 +26,18 @@
#pragma once
+#include <wtf/RefCounted.h>
+
namespace WebCore {
+class AbortSignal;
+
struct CredentialRequestOptions {
enum class MediationRequirement { Silent, Optional, Required };
MediationRequirement mediation;
+ RefPtr<AbortSignal> signal;
+ std::optional<bool> publicKey;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.idl (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.idl 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/CredentialRequestOptions.idl 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -31,4 +32,6 @@
dictionary CredentialRequestOptions {
CredentialMediationRequirement mediation = "optional";
+ AbortSignal signal;
+ boolean publicKey; // fake for now
};
Modified: trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.cpp 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,22 +27,119 @@
#include "config.h"
#include "CredentialsContainer.h"
+#include "AbortSignal.h"
+#include "CredentialCreationOptions.h"
+#include "CredentialRequestOptions.h"
+#include "Document.h"
+#include "ExceptionOr.h"
+#include "JSBasicCredential.h"
+#include "PublicKeyCredential.h"
+#include "SecurityOrigin.h"
+
namespace WebCore {
-void CredentialsContainer::get(std::optional<CredentialRequestOptions>, DOMPromiseDeferred<IDLInterface<BasicCredential>>&&)
+CredentialsContainer::CredentialsContainer(WeakPtr<Document>&& document)
+ : m_document(WTFMove(document))
+ , m_workQueue(WorkQueue::create("com.apple.WebKit.CredentialQueue"))
{
}
-void CredentialsContainer::store(const BasicCredential&, DOMPromiseDeferred<IDLInterface<BasicCredential>>&&)
+bool CredentialsContainer::doesHaveSameOriginAsItsAncestors()
{
+ if (!m_document)
+ return false;
+
+ auto& origin = m_document->securityOrigin();
+ for (auto* document = m_document->parentDocument(); document; document = document->parentDocument()) {
+ if (!originsMatch(document->securityOrigin(), origin))
+ return false;
+ }
+ return true;
}
-void CredentialsContainer::isCreate(std::optional<CredentialCreationOptions>, DOMPromiseDeferred<IDLInterface<BasicCredential>>&&)
+template<typename OperationType>
+void CredentialsContainer::dispatchTask(OperationType&& operation, Ref<DeferredPromise>&& promise)
{
+ auto* promiseIndex = promise.ptr();
+ m_pendingPromises.add(promiseIndex, WTFMove(promise));
+ auto weakThis = m_weakPtrFactory.createWeakPtr(*this);
+ auto task = [promiseIndex, weakThis, isSameOriginWithItsAncestors = doesHaveSameOriginAsItsAncestors(), operation = WTFMove(operation)] () {
+ auto result = operation(isSameOriginWithItsAncestors);
+ callOnMainThread([promiseIndex, weakThis, result = WTFMove(result)] () mutable {
+ if (weakThis) {
+ if (auto promise = weakThis->m_pendingPromises.take(promiseIndex)) {
+ if (result.hasException())
+ promise.value()->reject(result.releaseException());
+ else
+ promise.value()->resolve<IDLNullable<IDLInterface<BasicCredential>>>(result.releaseReturnValue().get());
+ }
+ }
+ });
+ };
+ m_workQueue->dispatch(WTFMove(task));
}
-void CredentialsContainer::preventSilentAccess(DOMPromiseDeferred<IDLInterface<BasicCredential>>&&)
+void CredentialsContainer::get(CredentialRequestOptions&& options, Ref<DeferredPromise>&& promise)
{
+ // FIXME: Optional options are passed with no contents. It should be std::optional.
+ if ((!options.signal && !options.publicKey) || !m_document) {
+ promise->reject(Exception { NotSupportedError });
+ return;
+ }
+ if (options.signal && options.signal->aborted()) {
+ promise->reject(Exception { AbortError });
+ return;
+ }
+ ASSERT(m_document->isSecureContext());
+
+ // The followings is a shortcut to https://www.w3.org/TR/credential-management-1/#algorithm-request,
+ // as we only support PublicKeyCredential which can only be requested from [[discoverFromExternalSource]].
+ if (!options.publicKey) {
+ promise->reject(Exception { NotSupportedError });
+ return;
+ }
+
+ auto operation = [options = WTFMove(options)] (bool isSameOriginWithItsAncestors) {
+ return PublicKeyCredential::discoverFromExternalSource(options, isSameOriginWithItsAncestors);
+ };
+ dispatchTask(WTFMove(operation), WTFMove(promise));
}
+void CredentialsContainer::store(const BasicCredential&, Ref<DeferredPromise>&& promise)
+{
+ promise->reject(Exception { NotSupportedError });
+}
+
+void CredentialsContainer::isCreate(CredentialCreationOptions&& options, Ref<DeferredPromise>&& promise)
+{
+ // FIXME: Optional options are passed with no contents. It should be std::optional.
+ if ((!options.signal && !options.publicKey) || !m_document) {
+ promise->reject(Exception { NotSupportedError });
+ return;
+ }
+ if (options.signal && options.signal->aborted()) {
+ promise->reject(Exception { AbortError });
+ return;
+ }
+ ASSERT(m_document->isSecureContext());
+
+ // This is a shortcut to https://www.w3.org/TR/credential-management-1/#credentialrequestoptions-relevant-credential-interface-objects,
+ // as we only support one kind of credentials.
+ if (!options.publicKey) {
+ promise->reject(Exception { NotSupportedError });
+ return;
+ }
+
+ auto operation = [options = WTFMove(options)] (bool isSameOriginWithItsAncestors) {
+ // Shortcut as well.
+ return PublicKeyCredential::create(options, isSameOriginWithItsAncestors);
+ };
+ dispatchTask(WTFMove(operation), WTFMove(promise));
+}
+
+void CredentialsContainer::preventSilentAccess(Ref<DeferredPromise>&& promise)
+{
+ promise->reject(Exception { NotSupportedError });
+}
+
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.h (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.h 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -25,28 +26,43 @@
#pragma once
-#include "CredentialCreationOptions.h"
-#include "CredentialRequestOptions.h"
#include "JSDOMPromiseDeferred.h"
+#include <wtf/Function.h>
#include <wtf/RefCounted.h>
+#include <wtf/WeakPtr.h>
+#include <wtf/WorkQueue.h>
namespace WebCore {
class BasicCredential;
+class Document;
+struct CredentialCreationOptions;
+struct CredentialRequestOptions;
+
class CredentialsContainer : public RefCounted<CredentialsContainer> {
public:
- static Ref<CredentialsContainer> create() { return adoptRef(*new CredentialsContainer); }
+ static Ref<CredentialsContainer> create(WeakPtr<Document>&& document) { return adoptRef(*new CredentialsContainer(WTFMove(document))); }
- void get(std::optional<CredentialRequestOptions>, DOMPromiseDeferred<IDLInterface<BasicCredential>>&&);
+ void get(CredentialRequestOptions&&, Ref<DeferredPromise>&&);
- void store(const BasicCredential&, DOMPromiseDeferred<IDLInterface<BasicCredential>>&&);
+ void store(const BasicCredential&, Ref<DeferredPromise>&&);
- void isCreate(std::optional<CredentialCreationOptions>, DOMPromiseDeferred<IDLInterface<BasicCredential>>&&);
+ void isCreate(CredentialCreationOptions&&, Ref<DeferredPromise>&&);
- void preventSilentAccess(DOMPromiseDeferred<IDLInterface<BasicCredential>>&&);
+ void preventSilentAccess(Ref<DeferredPromise>&&);
+
private:
- CredentialsContainer() { }
+ CredentialsContainer(WeakPtr<Document>&&);
+
+ bool doesHaveSameOriginAsItsAncestors();
+ template<typename OperationType>
+ void dispatchTask(OperationType&&, Ref<DeferredPromise>&&);
+
+ WeakPtr<Document> m_document;
+ HashMap<DeferredPromise*, Ref<DeferredPromise>> m_pendingPromises;
+ Ref<WorkQueue> m_workQueue;
+ WeakPtrFactory<CredentialsContainer> m_weakPtrFactory;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.idl (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.idl 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/CredentialsContainer.idl 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,6 +28,7 @@
EnabledAtRuntime=CredentialManagement,
Exposed=Window,
ImplementationLacksVTable,
+ SecureContext,
] interface CredentialsContainer {
Promise<BasicCredential?> get(optional CredentialRequestOptions options);
Promise<BasicCredential> store(BasicCredential credential);
Modified: trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.cpp (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.cpp 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.cpp 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,9 +27,10 @@
#include "config.h"
#include "NavigatorCredentials.h"
+#include "Document.h"
+#include "Frame.h"
#include "Navigator.h"
-
namespace WebCore {
NavigatorCredentials::NavigatorCredentials() = default;
@@ -40,10 +42,10 @@
return "NavigatorCredentials";
}
-CredentialsContainer* NavigatorCredentials::credentials()
+CredentialsContainer* NavigatorCredentials::credentials(WeakPtr<Document>&& document)
{
if (!m_credentialsContainer)
- m_credentialsContainer = CredentialsContainer::create();
+ m_credentialsContainer = CredentialsContainer::create(WTFMove(document));
return m_credentialsContainer.get();
}
@@ -50,7 +52,9 @@
CredentialsContainer* NavigatorCredentials::credentials(Navigator& navigator)
{
- return NavigatorCredentials::from(&navigator)->credentials();
+ if (!navigator.frame() || !navigator.frame()->document())
+ return nullptr;
+ return NavigatorCredentials::from(&navigator)->credentials(navigator.frame()->document()->createWeakPtr());
}
NavigatorCredentials* NavigatorCredentials::from(Navigator* navigator)
Modified: trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.h (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.h 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -27,6 +28,7 @@
#include "CredentialsContainer.h"
#include "Supplementable.h"
+#include <wtf/WeakPtr.h>
namespace WebCore {
@@ -37,11 +39,12 @@
NavigatorCredentials();
virtual ~NavigatorCredentials();
- CredentialsContainer* credentials();
+ static CredentialsContainer* credentials(Navigator&);
+private:
+ CredentialsContainer* credentials(WeakPtr<Document>&&);
+
static NavigatorCredentials* from(Navigator*);
- static CredentialsContainer* credentials(Navigator&);
-private:
static const char* supplementName();
RefPtr<CredentialsContainer> m_credentialsContainer;
Modified: trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.idl (226331 => 226332)
--- trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.idl 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Modules/credentialmanagement/NavigatorCredentials.idl 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2017 Google Inc. All rights reserved.
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -26,5 +27,5 @@
[
EnabledAtRuntime=CredentialManagement,
] partial interface Navigator {
- readonly attribute CredentialsContainer credentials;
+ [SecureContext, SameObject] readonly attribute CredentialsContainer credentials;
};
Copied: trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp (from rev 226331, trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp) (0 => 226332)
--- trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp (rev 0)
+++ trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.cpp 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2017 Apple 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.
+ */
+
+#include "config.h"
+#include "PublicKeyCredential.h"
+
+namespace WebCore {
+
+PublicKeyCredential::PublicKeyCredential(const String& id)
+ : BasicCredential(id, Type::PublicKey, Discovery::Remote)
+{
+}
+
+Vector<Ref<BasicCredential>> PublicKeyCredential::collectFromCredentialStore(CredentialRequestOptions&&, bool)
+{
+ return { };
+}
+
+ExceptionOr<RefPtr<BasicCredential>> PublicKeyCredential::discoverFromExternalSource(const CredentialRequestOptions&, bool)
+{
+ return Exception { NotSupportedError };
+}
+
+RefPtr<BasicCredential> PublicKeyCredential::store(RefPtr<BasicCredential>&&, bool)
+{
+ return nullptr;
+}
+
+ExceptionOr<RefPtr<BasicCredential>> PublicKeyCredential::create(const CredentialCreationOptions&, bool)
+{
+ return Exception { NotSupportedError };
+}
+
+}
Copied: trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.h (from rev 226331, trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.cpp) (0 => 226332)
--- trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.h (rev 0)
+++ trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2017 Apple 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.
+ */
+
+#pragma once
+
+#include "BasicCredential.h"
+#include "ExceptionOr.h"
+#include <wtf/Vector.h>
+
+namespace WebCore {
+
+struct CredentialCreationOptions;
+struct CredentialRequestOptions;
+
+class PublicKeyCredential final : public BasicCredential {
+public:
+ static Ref<PublicKeyCredential> create(const String& id)
+ {
+ return adoptRef(*new PublicKeyCredential(id));
+ }
+
+ static Vector<Ref<BasicCredential>> collectFromCredentialStore(CredentialRequestOptions&&, bool);
+ static ExceptionOr<RefPtr<BasicCredential>> discoverFromExternalSource(const CredentialRequestOptions&, bool);
+ static RefPtr<BasicCredential> store(RefPtr<BasicCredential>&&, bool);
+ static ExceptionOr<RefPtr<BasicCredential>> create(const CredentialCreationOptions&, bool);
+
+private:
+ PublicKeyCredential(const String&);
+};
+
+} // namespace WebCore
Copied: trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.idl (from rev 226331, trunk/Source/WebCore/Modules/credentialmanagement/BasicCredential.idl) (0 => 226332)
--- trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.idl (rev 0)
+++ trunk/Source/WebCore/Modules/webauthn/PublicKeyCredential.idl 2018-01-02 20:28:31 UTC (rev 226332)
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2017 Apple 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.
+ */
+
+[
+ EnabledAtRuntime=CredentialManagement,
+ Exposed=Window,
+ SecureContext,
+] interface PublicKeyCredential {
+ // Dummy for now.
+};
Modified: trunk/Source/WebCore/Sources.txt (226331 => 226332)
--- trunk/Source/WebCore/Sources.txt 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/Sources.txt 2018-01-02 20:28:31 UTC (rev 226332)
@@ -244,6 +244,8 @@
Modules/webaudio/WaveShaperNode.cpp
Modules/webaudio/WaveShaperProcessor.cpp
+Modules/webauthn/PublicKeyCredential.cpp
+
Modules/webdatabase/ChangeVersionWrapper.cpp
Modules/webdatabase/DOMWindowWebDatabase.cpp
Modules/webdatabase/Database.cpp
@@ -2732,6 +2734,7 @@
JSProcessingInstruction.cpp
JSProgressEvent.cpp
JSPromiseRejectionEvent.cpp
+JSPublicKeyCredential.cpp
JSRTCAnswerOptions.cpp
JSRTCConfiguration.cpp
JSRTCDTMFSender.cpp
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (226331 => 226332)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1662,6 +1662,8 @@
57C7A69F1E57917800C67D71 /* JSBasicCredential.h in Headers */ = {isa = PBXBuildFile; fileRef = 57C7A69D1E57910D00C67D71 /* JSBasicCredential.h */; };
57D0018D1DD5413200ED19D9 /* JSCryptoKeyUsage.h in Headers */ = {isa = PBXBuildFile; fileRef = 57D0018C1DD5413200ED19D9 /* JSCryptoKeyUsage.h */; };
57D846281FE8960500CA3682 /* NavigatorCredentials.h in Headers */ = {isa = PBXBuildFile; fileRef = 57D846261FE895F800CA3682 /* NavigatorCredentials.h */; };
+ 57D8462E1FEAF69900CA3682 /* PublicKeyCredential.h in Headers */ = {isa = PBXBuildFile; fileRef = 57D8462B1FEAF68F00CA3682 /* PublicKeyCredential.h */; };
+ 57D846351FEAFCD300CA3682 /* JSPublicKeyCredential.h in Headers */ = {isa = PBXBuildFile; fileRef = 57D846301FEAFC2F00CA3682 /* JSPublicKeyCredential.h */; };
57E1E5A31E8C91B500EE37C9 /* CryptoAlgorithmAES_CTR.h in Headers */ = {isa = PBXBuildFile; fileRef = 57E1E5A11E8C91B500EE37C9 /* CryptoAlgorithmAES_CTR.h */; };
57E1E5A71E8DBD3E00EE37C9 /* CryptoAlgorithmAesCtrParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 57E1E5A61E8DBD3E00EE37C9 /* CryptoAlgorithmAesCtrParams.h */; };
57E1E5AD1E8DD09B00EE37C9 /* JSAesCtrParams.h in Headers */ = {isa = PBXBuildFile; fileRef = 57E1E5AB1E8DD09B00EE37C9 /* JSAesCtrParams.h */; };
@@ -8201,6 +8203,11 @@
57D846251FE895F600CA3682 /* NavigatorCredentials.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NavigatorCredentials.idl; sourceTree = "<group>"; };
57D846261FE895F800CA3682 /* NavigatorCredentials.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigatorCredentials.h; sourceTree = "<group>"; };
57D846291FE99F6300CA3682 /* CredentialsContainer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CredentialsContainer.idl; sourceTree = "<group>"; };
+ 57D8462B1FEAF68F00CA3682 /* PublicKeyCredential.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PublicKeyCredential.h; sourceTree = "<group>"; };
+ 57D8462C1FEAF68F00CA3682 /* PublicKeyCredential.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PublicKeyCredential.cpp; sourceTree = "<group>"; };
+ 57D8462D1FEAF68F00CA3682 /* PublicKeyCredential.idl */ = {isa = PBXFileReference; lastKnownFileType = text; path = PublicKeyCredential.idl; sourceTree = "<group>"; };
+ 57D846301FEAFC2F00CA3682 /* JSPublicKeyCredential.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPublicKeyCredential.h; sourceTree = "<group>"; };
+ 57D846311FEAFC2F00CA3682 /* JSPublicKeyCredential.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPublicKeyCredential.cpp; sourceTree = "<group>"; };
57E1E5A01E8C91B500EE37C9 /* CryptoAlgorithmAES_CTR.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptoAlgorithmAES_CTR.cpp; sourceTree = "<group>"; };
57E1E5A11E8C91B500EE37C9 /* CryptoAlgorithmAES_CTR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmAES_CTR.h; sourceTree = "<group>"; };
57E1E5A61E8DBD3E00EE37C9 /* CryptoAlgorithmAesCtrParams.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptoAlgorithmAesCtrParams.h; sourceTree = "<group>"; };
@@ -15310,6 +15317,7 @@
E1C8BE4B0E8BD0D10064CB7D /* Threads */,
BC9854530CD3DA8F00069BC1 /* Traversal */,
FDA15E7B12B03E04003A583A /* WebAudio */,
+ 57D8462F1FEAFB0500CA3682 /* WebAuthN */,
5DA5E0F9102B950400088CF9 /* WebSockets */,
2DDE1CDC1F574A5600D1A365 /* WebVR */,
BC9854430CD3D9D000069BC1 /* Window */,
@@ -18044,6 +18052,25 @@
name = CredentialManagement;
sourceTree = "<group>";
};
+ 57D8462A1FEAF57F00CA3682 /* webauthn */ = {
+ isa = PBXGroup;
+ children = (
+ 57D8462C1FEAF68F00CA3682 /* PublicKeyCredential.cpp */,
+ 57D8462B1FEAF68F00CA3682 /* PublicKeyCredential.h */,
+ 57D8462D1FEAF68F00CA3682 /* PublicKeyCredential.idl */,
+ );
+ path = webauthn;
+ sourceTree = "<group>";
+ };
+ 57D8462F1FEAFB0500CA3682 /* WebAuthN */ = {
+ isa = PBXGroup;
+ children = (
+ 57D846311FEAFC2F00CA3682 /* JSPublicKeyCredential.cpp */,
+ 57D846301FEAFC2F00CA3682 /* JSPublicKeyCredential.h */,
+ );
+ name = WebAuthN;
+ sourceTree = "<group>";
+ };
59B5977111086556007159E8 /* jsc */ = {
isa = PBXGroup;
children = (
@@ -20108,6 +20135,7 @@
AA2A5AB716A485A400975A25 /* speech */,
41A023EA1A39DB7900F722CF /* streams */,
FD315FA212B025B100C1A359 /* webaudio */,
+ 57D8462A1FEAF57F00CA3682 /* webauthn */,
97BC69D51505F054001B74AC /* webdatabase */,
996E59DA1DF00D45006612B9 /* webdriver */,
97AABCF714FA09B5007457AE /* websockets */,
@@ -27961,6 +27989,7 @@
65DF320009D1CC60000BE325 /* JSProcessingInstruction.h in Headers */,
E44613EE0CD681BB00FADA75 /* JSProgressEvent.h in Headers */,
A578F43C1DE01423003DFC6A /* JSPromiseRejectionEvent.h in Headers */,
+ 57D846351FEAFCD300CA3682 /* JSPublicKeyCredential.h in Headers */,
077664FD183E6B5C00133B92 /* JSQuickTimePluginReplacement.h in Headers */,
B658FFA21522EF3A00DD5595 /* JSRadioNodeList.h in Headers */,
65DF320209D1CC60000BE325 /* JSRange.h in Headers */,
@@ -28549,6 +28578,7 @@
E12719C70EEEC16800F61213 /* NavigatorBase.h in Headers */,
8321507E1F27EA1B0095B136 /* NavigatorBeacon.h in Headers */,
57D846281FE8960500CA3682 /* NavigatorCredentials.h in Headers */,
+ 57D846281FE8960500CA3682 /* NavigatorCredentials.h in Headers */,
9711460414EF009A00674FD9 /* NavigatorGeolocation.h in Headers */,
5EA725D61ACABD5700EAD17B /* NavigatorMediaDevices.h in Headers */,
996E59DF1DF0128D006612B9 /* NavigatorWebDriver.h in Headers */,
@@ -28798,6 +28828,7 @@
51A052561058874000CC9E95 /* ProtectionSpaceHash.h in Headers */,
1AF8E11A1256592600230FF7 /* ProxyServer.h in Headers */,
FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */,
+ 57D8462E1FEAF69900CA3682 /* PublicKeyCredential.h in Headers */,
0081FF0016B0A2D3008AAA7A /* PublicSuffix.h in Headers */,
10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */,
550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */,
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (226331 => 226332)
--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -111,6 +111,7 @@
macro(PerformanceObserver) \
macro(PerformanceObserverEntryList) \
macro(PerformanceResourceTiming) \
+ macro(PublicKeyCredential) \
macro(RTCDTMFSender) \
macro(RTCDTMFToneChangeEvent) \
macro(RTCDataChannel) \
Modified: trunk/Tools/ChangeLog (226331 => 226332)
--- trunk/Tools/ChangeLog 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Tools/ChangeLog 2018-01-02 20:28:31 UTC (rev 226332)
@@ -1,3 +1,16 @@
+2018-01-02 Jiewen Tan <jiewen_...@apple.com>
+
+ Update Credential Management API for WebAuthentication
+ https://bugs.webkit.org/show_bug.cgi?id=181082
+ <rdar://problem/36055239>
+
+ Reviewed by Brent Fulgham.
+
+ Enable Credential Management API for testing.
+
+ * DumpRenderTree/TestOptions.h:
+ * WebKitTestRunner/TestOptions.h:
+
2018-01-02 Michael Catanzaro <mcatanz...@igalia.com>
[GTK] Test /webkit2/WebKitWebExtension/form-controls-associated-signal is flaky
Modified: trunk/Tools/DumpRenderTree/TestOptions.h (226331 => 226332)
--- trunk/Tools/DumpRenderTree/TestOptions.h 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Tools/DumpRenderTree/TestOptions.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -35,7 +35,7 @@
bool enableMenuItemElement { false };
bool enableModernMediaControls { true };
bool enablePointerLock { false };
- bool enableCredentialManagement { false };
+ bool enableCredentialManagement { true };
bool enableDragDestinationActionLoad { false };
bool layerBackedWebView { false };
bool enableIsSecureContextAttribute { true };
Modified: trunk/Tools/WebKitTestRunner/TestOptions.h (226331 => 226332)
--- trunk/Tools/WebKitTestRunner/TestOptions.h 2018-01-02 20:20:16 UTC (rev 226331)
+++ trunk/Tools/WebKitTestRunner/TestOptions.h 2018-01-02 20:28:31 UTC (rev 226332)
@@ -49,7 +49,7 @@
bool enableMenuItemElement { false };
bool enableModernMediaControls { true };
bool enablePointerLock { false };
- bool enableCredentialManagement { false };
+ bool enableCredentialManagement { true };
bool enableIsSecureContextAttribute { true };
bool enableInspectorAdditions { false };
bool shouldShowTouches { false };