<?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>226638</bug_id>
          
          <creation_ts>2021-06-04 03:01:55 -0700</creation_ts>
          <short_desc>Implement FetchEvent.replacesClientId</short_desc>
          <delta_ts>2023-11-12 07:16:57 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Service Workers</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jake Archibald">jaffathecake</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>gregory.terzian</cc>
    
    <cc>mail</cc>
    
    <cc>philip</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1766725</commentid>
    <comment_count>0</comment_count>
    <who name="Jake Archibald">jaffathecake</who>
    <bug_when>2021-06-04 03:01:55 -0700</bug_when>
    <thetext>This was renamed in 2018 (https://github.com/w3c/ServiceWorker/pull/1333) but no bug was filed with WebKit, sorry about that. Anyway, this is that bug. I don&apos;t expect the rename to cause problems in the wild.

Test to fail if targetClientId is present https://github.com/web-platform-tests/wpt/pull/29213.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1766752</commentid>
    <comment_count>1</comment_count>
    <who name="Philip Jägenstedt">philip</who>
    <bug_when>2021-06-04 07:08:23 -0700</bug_when>
    <thetext>As part of sorting out many errors in the browser compat data for FetchEvent in https://github.com/mdn/browser-compat-data/pull/10774, I noticed that no browser has shipped replacesClientId yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1768902</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-06-11 03:02:29 -0700</bug_when>
    <thetext>&lt;rdar://problem/79189580&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1829760</commentid>
    <comment_count>3</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2022-01-11 04:21:08 -0800</bug_when>
    <thetext>WebKit exposes targetClientId so I guess we should do the migration to replacesClientId even if no other browser supports it. We can deal with this as part of bug 190313</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1874290</commentid>
    <comment_count>4</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2022-06-06 06:44:34 -0700</bug_when>
    <thetext>targetClientId was removed in bug 235107, but replacesClientId wasn&apos;t implemented.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1949409</commentid>
    <comment_count>5</comment_count>
    <who name="Gregory Terzian">gregory.terzian</who>
    <bug_when>2023-04-18 02:27:48 -0700</bug_when>
    <thetext>Can I please tackle this one? 

I&apos;ve tried to follow the flow; is it correct that one should add a String, say &quot;m_replacesClientIdentifier&quot;, to the &quot;NetworkResourceLoader&quot; in the network process, and do something similar to what is currently done with &quot;m_resultingClientIdentifier&quot;(propagate it all the way to where the &quot;FetchEvent&quot; is created in &quot;ServiceWorkerFetch&quot; within WebCore)?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1949410</commentid>
    <comment_count>6</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2023-04-18 02:36:53 -0700</bug_when>
    <thetext>You are more than welcome to contribute :)

This bug might not be the easiest bug to tackle if this is your first WebKit contribution given there is probably few existing tests and no browser is implementing it yet: https://wpt.fyi/results/service-workers/idlharness.https.any.serviceworker.html?label=experimental&amp;label=master&amp;aligned

The principle would be to add to new ScriptExecutionContextIdentifier member to either FetchOptions or ResourceLoaderOptions.
See resultingClientId as an example.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1949658</commentid>
    <comment_count>7</comment_count>
    <who name="Gregory Terzian">gregory.terzian</who>
    <bug_when>2023-04-18 22:04:33 -0700</bug_when>
    <thetext>Great! 

A quick search indeed did not reveal any wpt test, but there is again the example of testing for the presence of resultingClientId(https://github.com/web-platform-tests/wpt/blob/0a40de7a4db9e52cdb0fc436173640756740c9e3/service-workers/service-worker/fetch-event.https.html#L129)

Thanks for the additional info, I will start looking into this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1950935</commentid>
    <comment_count>8</comment_count>
    <who name="Gregory Terzian">gregory.terzian</who>
    <bug_when>2023-04-24 20:38:25 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/13130</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>