Title: [272286] branches/safari-611-branch/Source/WebKit
- Revision
- 272286
- Author
- [email protected]
- Date
- 2021-02-02 17:41:42 -0800 (Tue, 02 Feb 2021)
Log Message
Cherry-pick r272040. rdar://problem/73887486
[WebAuthn] Adopt new SPI to show no credentials error for the platform authenticator
https://bugs.webkit.org/show_bug.cgi?id=220894
<rdar://problem/73538568>
Reviewed by Brent Fulgham.
Covered by manual tests.
* Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
* UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:
(WebKit::AuthenticatorPresenterCoordinator::updatePresenter):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-611-branch/Source/WebKit/ChangeLog (272285 => 272286)
--- branches/safari-611-branch/Source/WebKit/ChangeLog 2021-02-03 01:41:39 UTC (rev 272285)
+++ branches/safari-611-branch/Source/WebKit/ChangeLog 2021-02-03 01:41:42 UTC (rev 272286)
@@ -1,5 +1,38 @@
2021-02-02 Alan Coon <[email protected]>
+ Cherry-pick r272040. rdar://problem/73887486
+
+ [WebAuthn] Adopt new SPI to show no credentials error for the platform authenticator
+ https://bugs.webkit.org/show_bug.cgi?id=220894
+ <rdar://problem/73538568>
+
+ Reviewed by Brent Fulgham.
+
+ Covered by manual tests.
+
+ * Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
+ * UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:
+ (WebKit::AuthenticatorPresenterCoordinator::updatePresenter):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@272040 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-01-28 Jiewen Tan <[email protected]>
+
+ [WebAuthn] Adopt new SPI to show no credentials error for the platform authenticator
+ https://bugs.webkit.org/show_bug.cgi?id=220894
+ <rdar://problem/73538568>
+
+ Reviewed by Brent Fulgham.
+
+ Covered by manual tests.
+
+ * Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h:
+ * UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm:
+ (WebKit::AuthenticatorPresenterCoordinator::updatePresenter):
+
+2021-02-02 Alan Coon <[email protected]>
+
Cherry-pick r271880. rdar://problem/73889737
WebGL power preference and discrete/internal gpu selection implemented incorrectly with ANGLE
Modified: branches/safari-611-branch/Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h (272285 => 272286)
--- branches/safari-611-branch/Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h 2021-02-03 01:41:39 UTC (rev 272285)
+++ branches/safari-611-branch/Source/WebKit/Platform/spi/Cocoa/AuthenticationServicesCoreSPI.h 2021-02-03 01:41:42 UTC (rev 272286)
@@ -70,6 +70,7 @@
@interface ASCAuthorizationPresenter : NSObject <ASCAuthorizationPresenterHostProtocol>
- (void)presentAuthorizationWithContext:(ASCAuthorizationPresentationContext *)context completionHandler:(void (^)(id<ASCCredentialProtocol> _Nullable, NSError * _Nullable))completionHandler;
+- (void)presentError:(NSError *)error forService:(NSString *)service completionHandler:(void (^)(void))completionHandler;
- (void)updateInterfaceWithLoginChoices:(NSArray<id <ASCLoginChoiceProtocol>> *)loginChoices;
- (void)presentPINEntryInterface;
- (void)updateInterfaceForUserVisibleError:(NSError *)userVisibleError;
Modified: branches/safari-611-branch/Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm (272285 => 272286)
--- branches/safari-611-branch/Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm 2021-02-03 01:41:39 UTC (rev 272285)
+++ branches/safari-611-branch/Source/WebKit/UIProcess/WebAuthentication/Cocoa/AuthenticatorPresenterCoordinator.mm 2021-02-03 01:41:42 UTC (rev 272286)
@@ -122,11 +122,23 @@
[m_presenter updateInterfaceForUserVisibleError:error.get()];
break;
}
- case WebAuthenticationStatus::LANoCredential:
- if (m_delayedPresentationNeedsSecurityKey)
+ case WebAuthenticationStatus::LANoCredential: {
+ if (m_delayedPresentationNeedsSecurityKey) {
[m_context addLoginChoice:adoptNS([allocASCSecurityKeyPublicKeyCredentialLoginChoiceInstance() initAssertionPlaceholderChoice]).get()];
- m_delayedPresentation();
+ m_delayedPresentation();
+
+ break;
+ }
+
+ auto error = adoptNS([[NSError alloc] initWithDomain:ASCAuthorizationErrorDomain code:ASCAuthorizationErrorNoCredentialsFound userInfo:nil]);
+ [m_presenter presentError:error.get() forService:[m_context serviceName] completionHandler:makeBlockPtr([manager = m_manager] {
+ RunLoop::main().dispatch([manager] () mutable {
+ if (manager)
+ manager->cancel();
+ });
+ }).get()];
break;
+ }
case WebAuthenticationStatus::NoCredentialsFound: {
auto error = adoptNS([[NSError alloc] initWithDomain:ASCAuthorizationErrorDomain code:ASCAuthorizationErrorNoCredentialsFound userInfo:nil]);
[m_presenter updateInterfaceForUserVisibleError:error.get()];
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes