<?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>243906</bug_id>
          
          <creation_ts>2022-08-12 16:12:02 -0700</creation_ts>
          <short_desc>[GTK4] Guard WebKitWebExtension APIs</short_desc>
          <delta_ts>2022-09-07 07:15:36 -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>WebKitGTK</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>210100</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alicem</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1891034</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-08-12 16:12:02 -0700</bug_when>
    <thetext>The WebKitWebExtension APIs need to be removed before releasing GTK 4 or WPE 2 APIs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896128</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-09-04 06:41:21 -0700</bug_when>
    <thetext>To avoid completely derailing Epiphany&apos;s port to GTK 4, instead of removing them, we should guard them behind an I_KNOW_THE_WEBKIT_WEB_PROCESS_EXTENSION_API_WILL_PROBABLY_GO_AWAY_SOON flag.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896132</commentid>
    <comment_count>2</comment_count>
    <who name="Alice Mikhaylenko">alicem</who>
    <bug_when>2022-09-04 07:22:27 -0700</bug_when>
    <thetext>+1, this way we can do a proper transition like Apple ports once the replacements are in place, rather than basically preventing most apps from porting at all for months if not years.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896280</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2022-09-05 01:17:28 -0700</bug_when>
    <thetext>I&apos;m not sure about this, I suspect we will have to bump the api version once the new solution for JavaScript injection is added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896336</commentid>
    <comment_count>4</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-09-05 06:53:19 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #3)
&gt; I&apos;m not sure about this, I suspect we will have to bump the api version once
&gt; the new solution for JavaScript injection is added.

You mean you think it will be possible to not completely remove the WebKitWebExtension API, and to merely bump its API version?

Or you expect we would need to bump the UI process API version?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896447</commentid>
    <comment_count>5</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2022-09-06 00:09:45 -0700</bug_when>
    <thetext>It&apos;s difficult to know because we don&apos;t know how we are going to replace all the functionality exposed from injected bundle, but it&apos;s possible that the changes in the design require a new api version bump. And in any case that&apos;s not going to happen soon, so we can simply do the version bump if needed eventually.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896487</commentid>
    <comment_count>6</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-09-06 06:15:40 -0700</bug_when>
    <thetext>(In reply to Carlos Garcia Campos from comment #5)
&gt; It&apos;s difficult to know because we don&apos;t know how we are going to replace all
&gt; the functionality exposed from injected bundle, but it&apos;s possible that the
&gt; changes in the design require a new api version bump.

Do you expect we will need a UI process API version bump, or a web process API version bump? I was expecting that the entire injected bundle and all web process APIs would completely go away.

Of course we want a stable GTK 4 API as soon as possible, and to avoid a UI process version bump after that at all costs. I&apos;m going to propose we remove the webkit_web_view_send_message_to_page() or webkit_web_context_send_message_to_all_extensions() UI process APIs now to avoid needing to remove them later.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896659</commentid>
    <comment_count>7</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2022-09-07 01:08:50 -0700</bug_when>
    <thetext>We will need a way to inject js in any case, so whatever it&apos;s called, we will probably have to load a .so from the frame process. The point of the deprecation is to isolate iframes into their own process and current injected bundle api is page oriented, so we will need a new api for sure, based on frames. In any case, I understand we don&apos;t want to release a new api version to break it soon, but it&apos;s very difficult to make a decision now based on something that we don&apos;t know when and how it will be. So, I would focus on making easy to port apps to new api and we have to bump the version again in two years, let&apos;s just do it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896782</commentid>
    <comment_count>8</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-09-07 06:26:26 -0700</bug_when>
    <thetext>It sounds like you probably agree with the plan to keep the WebKitWebExtension APIs but guard them behind the I_KNOW_THE_WEBKIT_WEB_PROCESS_EXTENSION_API_WILL_PROBABLY_GO_AWAY_SOON flag?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896792</commentid>
    <comment_count>9</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2022-09-07 06:51:22 -0700</bug_when>
    <thetext>No, I would just pretend we don&apos;t know anything about injected bundle deprecation, and just do whatever is best for the project right now. Because as I said, it&apos;s very difficult to make the right decision with the very little information we have now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1896801</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-09-07 07:15:36 -0700</bug_when>
    <thetext>Well... OK, let&apos;s do as you prefer.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>