<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>313736</bug_id>
          
          <creation_ts>2026-04-30 05:56:59 -0700</creation_ts>
          <short_desc>Digital Credentials: reject and resolve paths must queue a global task per spec</short_desc>
          <delta_ts>2026-08-18 18:45:35 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebCore Misc.</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>268516</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcos Caceres">marcosc</reporter>
          <assigned_to name="Marcos Caceres">marcosc</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2206216</commentid>
    <comment_count>0</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2026-04-30 05:56:59 -0700</bug_when>
    <thetext>The spec&apos;s &quot;reject the credential request with&quot; algorithm (https://w3c-fedid.github.io/digital-credentials/#reject-the-credential-request) requires:

  &quot;Queue a global task on the DOM manipulation task source given |promise|&apos;s relevant global object to perform the following steps:
    - [cleanup abort signal/algorithm]
    - Reject |promise| with |error|
    - Set active promise to null
    - Set interaction state to idle&quot;

Similarly, the success path in &quot;initiate the credential request&quot; (step 3e.iii) also requires:

  &quot;Queue a global task on the DOM manipulation task source given |document|&apos;s relevant global object to perform the following steps:
    - [parse JSON, create DigitalCredential, resolve promise]
    - Set active promise to null
    - Set interaction state to idle&quot;

WebKit&apos;s dismissPickerAndSettle() does not queue a global task — it runs the rejection/resolution inside the dismissDigitalCredentialsPicker completion callback. Similarly, the success path in handleDigitalCredentialsPickerResult resolves synchronously.

Both paths need to be restructured to queue a global task on the DOM manipulation task source.

Note: Bug 311790 covers the specific case of the non-idle rejection in &quot;prepare credential requests&quot; step 2. This bug is broader — it covers the shared reject algorithm and the success path, which are used by all error and success code paths.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2207103</commentid>
    <comment_count>1</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2026-05-03 23:34:46 -0700</bug_when>
    <thetext>&lt;rdar://problem/174308268&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2207104</commentid>
    <comment_count>2</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2026-05-03 23:35:46 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/64153</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2230759</commentid>
    <comment_count>3</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2026-07-15 15:43:36 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/69509</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2231927</commentid>
    <comment_count>4</comment_count>
    <who name="Marcos Caceres">marcosc</who>
    <bug_when>2026-07-20 00:40:16 -0700</bug_when>
    <thetext>&lt;rdar://problem/182678875&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2241642</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-08-18 18:45:33 -0700</bug_when>
    <thetext>Committed 319421@main (04257c5b7055): &lt;https://commits.webkit.org/319421@main&gt;

Reviewed commits have been landed. Closing PR #69509 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>