Title: [264528] trunk/Source/WebKit
- Revision
- 264528
- Author
- [email protected]
- Date
- 2020-07-17 12:30:23 -0700 (Fri, 17 Jul 2020)
Log Message
[WebAuthn] Use MediaOnly user gesture
https://bugs.webkit.org/show_bug.cgi?id=213595
<rdar://problem/64946612>
Reviewed by Brent Fulgham.
MediaOnly user gesture is more flexible than regular user gesture. For example, it can be propagated through XHR.
A common use case for WebAuthn is to call the API within XHR events, which could be triggered by user activated events initially.
By using MediaOnly user gesture, it allows developer to keep using this XHR model.
* WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
(WebKit::WebAuthenticatorCoordinator::makeCredential):
(WebKit::WebAuthenticatorCoordinator::getAssertion):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (264527 => 264528)
--- trunk/Source/WebKit/ChangeLog 2020-07-17 19:13:59 UTC (rev 264527)
+++ trunk/Source/WebKit/ChangeLog 2020-07-17 19:30:23 UTC (rev 264528)
@@ -1,3 +1,19 @@
+2020-07-17 Jiewen Tan <[email protected]>
+
+ [WebAuthn] Use MediaOnly user gesture
+ https://bugs.webkit.org/show_bug.cgi?id=213595
+ <rdar://problem/64946612>
+
+ Reviewed by Brent Fulgham.
+
+ MediaOnly user gesture is more flexible than regular user gesture. For example, it can be propagated through XHR.
+ A common use case for WebAuthn is to call the API within XHR events, which could be triggered by user activated events initially.
+ By using MediaOnly user gesture, it allows developer to keep using this XHR model.
+
+ * WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp:
+ (WebKit::WebAuthenticatorCoordinator::makeCredential):
+ (WebKit::WebAuthenticatorCoordinator::getAssertion):
+
2020-07-17 David Kilzer <[email protected]>
[IPC hardening] Add nullptr checks to WebKit::WebInspectorProxy::platformStartWindowDrag()
Modified: trunk/Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp (264527 => 264528)
--- trunk/Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp 2020-07-17 19:13:59 UTC (rev 264527)
+++ trunk/Source/WebKit/WebProcess/WebAuthentication/WebAuthenticatorCoordinator.cpp 2020-07-17 19:30:23 UTC (rev 264528)
@@ -53,7 +53,7 @@
if (!webFrame)
return;
- auto processingUserGesture = UserGestureIndicator::processingUserGesture();
+ auto processingUserGesture = UserGestureIndicator::processingUserGestureForMedia();
if (!processingUserGesture)
m_webPage.addConsoleMessage(webFrame->frameID(), MessageSource::Other, MessageLevel::Warning, "User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.create' within user activated events."_s);
@@ -66,7 +66,7 @@
if (!webFrame)
return;
- auto processingUserGesture = UserGestureIndicator::processingUserGesture();
+ auto processingUserGesture = UserGestureIndicator::processingUserGestureForMedia();
if (!processingUserGesture)
m_webPage.addConsoleMessage(webFrame->frameID(), MessageSource::Other, MessageLevel::Warning, "User gesture is not detected. To use the platform authenticator, call 'navigator.credentials.get' within user activated events."_s);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes