Diff
Modified: branches/safari-608-branch/LayoutTests/ChangeLog (250732 => 250733)
--- branches/safari-608-branch/LayoutTests/ChangeLog 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/LayoutTests/ChangeLog 2019-10-04 18:43:03 UTC (rev 250733)
@@ -1,3 +1,49 @@
+2019-10-04 Kocsen Chung <kocsen_ch...@apple.com>
+
+ Cherry-pick r249436. rdar://problem/55989217
+
+ [WebAuthn] Enable WebAuthn by default for MobileSafari and SafariViewService
+ https://bugs.webkit.org/show_bug.cgi?id=201369
+ <rdar://problem/54903724>
+
+ Reviewed by Brent Fulgham.
+
+ Source/WebCore:
+
+ * platform/RuntimeApplicationChecks.h:
+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+ (WebCore::IOSApplication::isSafariViewService):
+ Adds a way to detect SafariViewService.
+
+ Source/WebKit:
+
+ Communications to security keys require entitlements, which are not guaranteed to be present in third party
+ WKWebView clients. Therefore, only enable WebAuthn by default for MobileSafari and SafariViewService.
+
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultWebAuthenticationEnabled):
+ * Shared/WebPreferencesDefaultValues.h:
+
+ LayoutTests:
+
+ * http/wpt/webauthn/public-key-credential-get-success-nfc.https.html:
+ Imporves the test a bit.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-09-03 Jiewen Tan <jiewen_...@apple.com>
+
+ [WebAuthn] Enable WebAuthn by default for MobileSafari and SafariViewService
+ https://bugs.webkit.org/show_bug.cgi?id=201369
+ <rdar://problem/54903724>
+
+ Reviewed by Brent Fulgham.
+
+ * http/wpt/webauthn/public-key-credential-get-success-nfc.https.html:
+ Imporves the test a bit.
+
2019-10-03 Alan Coon <alanc...@apple.com>
Cherry-pick r250659. rdar://problem/55954229
Modified: branches/safari-608-branch/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-nfc.https.html (250732 => 250733)
--- branches/safari-608-branch/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-nfc.https.html 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/LayoutTests/http/wpt/webauthn/public-key-credential-get-success-nfc.https.html 2019-10-04 18:43:03 UTC (rev 250733)
@@ -25,7 +25,7 @@
const options = {
publicKey: {
challenge: Base64URL.parse("MTIzNDU2"),
- allowCredentials: [{ type: "public-key", id: Base64URL.parse(testU2fCredentialIdBase64) }],
+ allowCredentials: [{ type: "public-key", id: Base64URL.parse(testU2fCredentialIdBase64), transports: ["nfc"] }],
timeout: 100
}
};
Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (250732 => 250733)
--- branches/safari-608-branch/Source/WebCore/ChangeLog 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog 2019-10-04 18:43:03 UTC (rev 250733)
@@ -1,3 +1,51 @@
+2019-10-04 Kocsen Chung <kocsen_ch...@apple.com>
+
+ Cherry-pick r249436. rdar://problem/55989217
+
+ [WebAuthn] Enable WebAuthn by default for MobileSafari and SafariViewService
+ https://bugs.webkit.org/show_bug.cgi?id=201369
+ <rdar://problem/54903724>
+
+ Reviewed by Brent Fulgham.
+
+ Source/WebCore:
+
+ * platform/RuntimeApplicationChecks.h:
+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+ (WebCore::IOSApplication::isSafariViewService):
+ Adds a way to detect SafariViewService.
+
+ Source/WebKit:
+
+ Communications to security keys require entitlements, which are not guaranteed to be present in third party
+ WKWebView clients. Therefore, only enable WebAuthn by default for MobileSafari and SafariViewService.
+
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultWebAuthenticationEnabled):
+ * Shared/WebPreferencesDefaultValues.h:
+
+ LayoutTests:
+
+ * http/wpt/webauthn/public-key-credential-get-success-nfc.https.html:
+ Imporves the test a bit.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-09-03 Jiewen Tan <jiewen_...@apple.com>
+
+ [WebAuthn] Enable WebAuthn by default for MobileSafari and SafariViewService
+ https://bugs.webkit.org/show_bug.cgi?id=201369
+ <rdar://problem/54903724>
+
+ Reviewed by Brent Fulgham.
+
+ * platform/RuntimeApplicationChecks.h:
+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+ (WebCore::IOSApplication::isSafariViewService):
+ Adds a way to detect SafariViewService.
+
2019-10-03 Alan Coon <alanc...@apple.com>
Cherry-pick r250659. rdar://problem/55954229
Modified: branches/safari-608-branch/Source/WebCore/platform/RuntimeApplicationChecks.h (250732 => 250733)
--- branches/safari-608-branch/Source/WebCore/platform/RuntimeApplicationChecks.h 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/Source/WebCore/platform/RuntimeApplicationChecks.h 2019-10-04 18:43:03 UTC (rev 250733)
@@ -79,6 +79,7 @@
WEBCORE_EXPORT bool isMobileMail();
WEBCORE_EXPORT bool isMailCompositionService();
WEBCORE_EXPORT bool isMobileSafari();
+WEBCORE_EXPORT bool isSafariViewService();
WEBCORE_EXPORT bool isIMDb();
WEBCORE_EXPORT bool isWebBookmarksD();
WEBCORE_EXPORT bool isDumpRenderTree();
Modified: branches/safari-608-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm (250732 => 250733)
--- branches/safari-608-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm 2019-10-04 18:43:03 UTC (rev 250733)
@@ -214,6 +214,12 @@
return isMobileSafari;
}
+bool IOSApplication::isSafariViewService()
+{
+ static bool isSafariViewService = applicationBundleIsEqualTo("com.apple.SafariViewService"_s);
+ return isSafariViewService;
+}
+
bool IOSApplication::isIMDb()
{
static bool isIMDb = applicationBundleIsEqualTo("com.imdb.imdb"_s);
Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (250732 => 250733)
--- branches/safari-608-branch/Source/WebKit/ChangeLog 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog 2019-10-04 18:43:03 UTC (rev 250733)
@@ -1,3 +1,54 @@
+2019-10-04 Kocsen Chung <kocsen_ch...@apple.com>
+
+ Cherry-pick r249436. rdar://problem/55989217
+
+ [WebAuthn] Enable WebAuthn by default for MobileSafari and SafariViewService
+ https://bugs.webkit.org/show_bug.cgi?id=201369
+ <rdar://problem/54903724>
+
+ Reviewed by Brent Fulgham.
+
+ Source/WebCore:
+
+ * platform/RuntimeApplicationChecks.h:
+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
+ (WebCore::IOSApplication::isSafariViewService):
+ Adds a way to detect SafariViewService.
+
+ Source/WebKit:
+
+ Communications to security keys require entitlements, which are not guaranteed to be present in third party
+ WKWebView clients. Therefore, only enable WebAuthn by default for MobileSafari and SafariViewService.
+
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultWebAuthenticationEnabled):
+ * Shared/WebPreferencesDefaultValues.h:
+
+ LayoutTests:
+
+ * http/wpt/webauthn/public-key-credential-get-success-nfc.https.html:
+ Imporves the test a bit.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249436 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-09-03 Jiewen Tan <jiewen_...@apple.com>
+
+ [WebAuthn] Enable WebAuthn by default for MobileSafari and SafariViewService
+ https://bugs.webkit.org/show_bug.cgi?id=201369
+ <rdar://problem/54903724>
+
+ Reviewed by Brent Fulgham.
+
+ Communications to security keys require entitlements, which are not guaranteed to be present in third party
+ WKWebView clients. Therefore, only enable WebAuthn by default for MobileSafari and SafariViewService.
+
+ * Shared/WebPreferences.yaml:
+ * Shared/WebPreferencesDefaultValues.cpp:
+ (WebKit::defaultWebAuthenticationEnabled):
+ * Shared/WebPreferencesDefaultValues.h:
+
2019-10-03 Alan Coon <alanc...@apple.com>
Cherry-pick r250659. rdar://problem/55954229
Modified: branches/safari-608-branch/Source/WebKit/Shared/WebPreferences.yaml (250732 => 250733)
--- branches/safari-608-branch/Source/WebKit/Shared/WebPreferences.yaml 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/Source/WebKit/Shared/WebPreferences.yaml 2019-10-04 18:43:03 UTC (rev 250733)
@@ -762,7 +762,7 @@
WebAuthenticationEnabled:
type: bool
- defaultValue: DEFAULT_WEB_AUTHENTICATION_ENABLED
+ defaultValue: defaultWebAuthenticationEnabled()
humanReadableName: "Web Authentication"
humanReadableDescription: "Enable Web Authentication support"
webcoreBinding: RuntimeEnabledFeatures
Modified: branches/safari-608-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (250732 => 250733)
--- branches/safari-608-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp 2019-10-04 18:43:03 UTC (rev 250733)
@@ -79,4 +79,15 @@
#endif // ENABLE(TEXT_AUTOSIZING) && !PLATFORM(IOS_FAMILY)
+bool defaultWebAuthenticationEnabled()
+{
+#if PLATFORM(IOS_FAMILY)
+ return WebCore::IOSApplication::isMobileSafari() || WebCore::IOSApplication::isSafariViewService();
+#elif PLATFORM(MAC)
+ return true;
+#else
+ return false;
+#endif
+}
+
} // namespace WebKit
Modified: branches/safari-608-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h (250732 => 250733)
--- branches/safari-608-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2019-10-04 18:26:19 UTC (rev 250732)
+++ branches/safari-608-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.h 2019-10-04 18:43:03 UTC (rev 250733)
@@ -270,12 +270,6 @@
#define DEFAULT_APPLE_PAY_ENABLED false
#endif
-#if PLATFORM(MAC)
-#define DEFAULT_WEB_AUTHENTICATION_ENABLED true
-#else
-#define DEFAULT_WEB_AUTHENTICATION_ENABLED false
-#endif
-
namespace WebKit {
bool defaultPassiveTouchListenersAsDefaultOnDocument();
@@ -286,4 +280,6 @@
bool defaultTextAutosizingUsesIdempotentMode();
#endif
+bool defaultWebAuthenticationEnabled();
+
} // namespace WebKit