Skip to content

Commit

Permalink
[WebAuthn] Remove document focus requirement for conditional mediatio…
Browse files Browse the repository at this point in the history
…n requests

https://bugs.webkit.org/show_bug.cgi?id=240361
rdar://problem/93201070

Reviewed by Brent Fulgham.

This is necessary so conditional mediation requests work when you open a page in
a new tab. Conditional mediation requests do not support security keys and the
request will be aborted if conditional mediation is not available.

* Modules/credentialmanagement/CredentialsContainer.cpp:
(WebCore::CredentialsContainer::get):

Canonical link: https://commits.webkit.org/250506@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@294135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
pascoej committed May 13, 2022
1 parent e1a113f commit b54396f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
15 changes: 15 additions & 0 deletions Source/WebCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
2022-05-12 J Pascoe <j_pascoe@apple.com>

[WebAuthn] Remove document focus requirement for conditional mediation requests
https://bugs.webkit.org/show_bug.cgi?id=240361
rdar://problem/93201070

Reviewed by Brent Fulgham.

This is necessary so conditional mediation requests work when you open a page in
a new tab. Conditional mediation requests do not support security keys and the
request will be aborted if conditional mediation is not available.

* Modules/credentialmanagement/CredentialsContainer.cpp:
(WebCore::CredentialsContainer::get):

2022-05-12 Alan Bujtas <zalan@apple.com>

TextBoxPainter::paintForeground: painting text with no marking/decoration should be simple
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ void CredentialsContainer::get(CredentialRequestOptions&& options, CredentialPro
return;
}

// Extra.
if (!m_document->hasFocus()) {
// The request will be aborted in WebAuthenticatorCoordinatorProxy if conditional mediation is not available.
if (options.mediation != CredentialRequestOptions::MediationRequirement::Conditional && !m_document->hasFocus()) {
promise.reject(Exception { NotAllowedError, "The document is not focused."_s });
return;
}
Expand Down

0 comments on commit b54396f

Please sign in to comment.