<?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>169037</bug_id>
          
          <creation_ts>2017-03-01 07:41:00 -0800</creation_ts>
          <short_desc>[WK2] Missing C API for UserContentExtensionStore prevents instantiating content extensions</short_desc>
          <delta_ts>2018-12-13 00:12:40 -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>WebKit2</component>
          <version>Other</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>167941</dup_id>
          
          <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>154553</blocked>
    
    <blocked>169607</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>achristensen</cc>
    
    <cc>beidson</cc>
    
    <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>sam</cc>
    
    <cc>ysuzuki</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1282274</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-01 07:41:00 -0800</bug_when>
    <thetext>The WebKit2 C API does not provide a way to instantiate an UserContentExtensionStore,
nor provides any other means of compiling content extensions.

Having this would allow using the C API in WKTR to handle tests which make use of
content extensions. In turn, this would make it unnecessary to use the Cocoa API
in WKTR, and by using the C API it would be trivial for the GTK+ port to unskip
the content extensions layout tests.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1282277</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-01 07:50:18 -0800</bug_when>
    <thetext>I have already a WIP patch for this, as a side effect of working on
bug #167941 and wanting to unskip the layout tests in the GTK+ port.
Once I figure out a couple of rough edges and can run the tests I
will upload the patch.

The API bits being added would be:

  // Source/WebKit2/UIProcess/API/C/WKUserContentExtensionStoreRef.h

  WK_EXPORT WKUserContentExtensionStoreRef WKUserContentExtensionStoreCreate(WKStringRef path);

  enum {
    kWKUserContentExtensionStoreSuccess = 0,
    kWKUserContentExtensionStoreLookupFailed,
    kWKUserContentExtensionStoreVersionMismatch,
    kWKUserContentExtensionStoreCompileFailed,
    kWKUserContentExtensionStoreRemoveFailed,
  };
  typedef uint32_t WKUserContentExtensionStoreResult;
 
  typedef void (*WKUserContentExtensionStoreFilterFunction)(WKUserContentExtensionStoreRef,   
                                                            WKUserContentFilterRef,
                                                            WKUserContentExtensionStoreResult,
                                                            void*);

  void WKUserContentExtensionStoreCompileFilter(WKUserContentExtensionStoreRef,
                                                WKStringRef identifier,
                                                WKStringRef jsonSource,
                                                void* context,
                                                WKUserContentExtensionStoreFilterFunction callback);

  void WKUserContentExtensionStoreLookupFilter(WKUserContentExtensionStoreRef,
                                               WKStringRef identifier,
                                               void* context,
                                               WKUserContentExtensionStoreFilterFunction callback);

  void WKUserContentExtensionStoreRemoveFilter(WKUserContentExtensionStoreRef,
                                               WKStringRef identifier,
                                               void* context,
                                               WKUserContentExtensionStoreFilterFunction callback);

The order of parameters follows the underlying API::UserContentExtensionsStore methods, and where
a C++ lambda is accepted, a callback function is used instead. As in other functions in the C API
which take callbacks, the “context” parameter (a “void*” passed back to the callback) appears in
the signature _before_ the “callback” parameter.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287363</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-13 15:00:19 -0700</bug_when>
    <thetext>Ping. Any comment regarding this? Unless stated otherwise, I&apos;ll go ahead
and upload a patch adding the proposed API in the next days.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287457</commentid>
    <comment_count>3</comment_count>
      <attachid>304335</attachid>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-13 19:19:36 -0700</bug_when>
    <thetext>Created attachment 304335
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287461</commentid>
    <comment_count>4</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-13 19:29:58 -0700</bug_when>
    <thetext>I have uploaded the patch in its current state to gather some feedback.
In particular, I have two questions/doubts:

 - How would one go about adding unit tests for this? There is no
   “Tools/TestWebKitAPI/Tests/WebKit2C/*” or similar.

 - Should the patch include also a function
   “WKUserContentExtensionStoreGetDefaultUserContentExtensionStore()”?

 - With this API added, the usage of the Objective-C API in WKTR to test
   content extensions could be dropped. Should that be included here, or
   in a follow-up patch/bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287481</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2017-03-13 20:33:47 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; I have uploaded the patch in its current state to gather some feedback.
&gt; In particular, I have two questions/doubts:
&gt; 
&gt;  - How would one go about adding unit tests for this? There is no
&gt;    “Tools/TestWebKitAPI/Tests/WebKit2C/*” or similar.

Put them in Tools/TestWebKitAPI/Tests/WebKit2/.

&gt;  - Should the patch include also a function
&gt;    “WKUserContentExtensionStoreGetDefaultUserContentExtensionStore()”?

Probably. Why not?

&gt;  - With this API added, the usage of the Objective-C API in WKTR to test
&gt;    content extensions could be dropped. Should that be included here, or
&gt;    in a follow-up patch/bug?

I think either approach is fine, but my preference is for two different patches.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287618</commentid>
    <comment_count>6</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-14 08:19:25 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; (In reply to comment #4)
&gt; &gt; I have uploaded the patch in its current state to gather some feedback.
&gt; &gt; In particular, I have two questions/doubts:
&gt; &gt; 
&gt; &gt;  - How would one go about adding unit tests for this? There is no
&gt; &gt;    “Tools/TestWebKitAPI/Tests/WebKit2C/*” or similar.

Oh, somehow I didn&apos;t check this one directory. Thanks!

&gt; Put them in Tools/TestWebKitAPI/Tests/WebKit2/.
&gt; 
&gt; &gt;  - Should the patch include also a function
&gt; &gt;    “WKUserContentExtensionStoreGetDefaultUserContentExtensionStore()”?
&gt; 
&gt; Probably. Why not?

The idea so far is that the GTK+ port will require specifying always the
path, but given that the C API can be used by other ports, it is probably
better to add it as well.

&gt; &gt;  - With this API added, the usage of the Objective-C API in WKTR to test
&gt; &gt;    content extensions could be dropped. Should that be included here, or
&gt; &gt;    in a follow-up patch/bug?
&gt; 
&gt; I think either approach is fine, but my preference is for two different
&gt; patches.

I also prefer to handle it separately. It is now filed as bug #169607</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287805</commentid>
    <comment_count>7</comment_count>
      <attachid>304335</attachid>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-03-14 14:48:01 -0700</bug_when>
    <thetext>Comment on attachment 304335
Patch

I assume this is for WebKitTestRunner, right?  Could this be adopted in the same patch?
Is there an intent to add a gtk-specific C API corresponding to this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287835</commentid>
    <comment_count>8</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-14 15:32:15 -0700</bug_when>
    <thetext>(In reply to comment #7)
&gt; Comment on attachment 304335 [details]
&gt; Patch
&gt; 
&gt; I assume this is for WebKitTestRunner, right?

Yes, I tend to abbreviate WebKitTestRunner == WKTR. O:-)

&gt; [...] Could this be adopted in the same patch?

Our plan was to do the WebKitTestRunner part as bug #169607, as it seemed
easier for review smaller but I do not have a strong opinion for doing two
separate patches/bugs. I&apos;ll add the WebKitTestRunner changes together with
this, hopefully that would ease the process.

&gt; Is there an intent to add a gtk-specific C API corresponding to this?

Absolutely. That is being tracked as bug #169037. There&apos;s a preview patch
there with a tentative API.

Our plan is to add the C API and put it to use in WebKitTestRunner first;
then try using the proposed GTK+ API in Epiphany, see how it feels and
improve it if needed, and then land the new GTK+ API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287901</commentid>
    <comment_count>9</comment_count>
    <who name="Alex Christensen">achristensen</who>
    <bug_when>2017-03-14 17:25:17 -0700</bug_when>
    <thetext>I think these changes and WKTR changes should be in the same patch so we can see why we are making the changes and that they actually work.
Sometimes with callbacks that need to capture things like lambda captures we use a listener object in the C API.  I&apos;m not sure if you&apos;ll want to do that here.  Right now we probably don&apos;t need state, but it would probably be useful to know at least which request to compile a content extension you are responding to.  For example, if you initiate the compiling of two different content extensions, then with your proposed API the completion handler wouldn&apos;t be able to know which content extension compiling just completed at runtime.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287918</commentid>
    <comment_count>10</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-14 18:09:24 -0700</bug_when>
    <thetext>(In reply to comment #9)
&gt; I think these changes and WKTR changes should be in the same patch so we can
&gt; see why we are making the changes and that they actually work.

Let&apos;s do it that way, then.

&gt; Sometimes with callbacks that need to capture things like lambda captures we
&gt; use a listener object in the C API.  I&apos;m not sure if you&apos;ll want to do that
&gt; here.  Right now we probably don&apos;t need state, but it would probably be
&gt; useful to know at least which request to compile a content extension you are
&gt; responding to.  For example, if you initiate the compiling of two different
&gt; content extensions, then with your proposed API the completion handler
&gt; wouldn&apos;t be able to know which content extension compiling just completed at
&gt; runtime.

I did briefly considered adding a listener, but it seemed a bit too heavy
in this case. As for knowing which request has completed, one could save the
identifier string into a “struct” passed as the “context” pointer that gets
passed back to the completion callback... But even when that&apos;s possible, I
have to agree that it is far from having good ergonomics.

Probably passing back the identifier string to the completion callback is
a very reasonable option, using the following signature for callback the
completion callback functions:

   typedef void (*WKUserContentExtensionStoreFilterFunction)(WKUserContentExtensionStoreRef,
                                                             WKStringRef identifier,
                                                             WKUserContentFilterRef,
                                                             WKUserContentExtensionStoreResult,
                                                             void*);

The “identifier” argument passed to callbacks would always be non-NULL.
How does this sound?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1287922</commentid>
    <comment_count>11</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2017-03-14 18:11:17 -0700</bug_when>
    <thetext>*** Bug 169607 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1389360</commentid>
    <comment_count>12</comment_count>
      <attachid>304335</attachid>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2018-01-15 12:54:54 -0800</bug_when>
    <thetext>Comment on attachment 304335
Patch

Every bot is red here ;)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1487526</commentid>
    <comment_count>13</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2018-12-13 00:12:40 -0800</bug_when>
    <thetext>I&apos;ll be handling this as part of #167941

*** This bug has been marked as a duplicate of bug 167941 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>304335</attachid>
            <date>2017-03-13 19:19:36 -0700</date>
            <delta_ts>2018-01-15 12:54:54 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-169037-20170314041934.patch</filename>
            <type>text/plain</type>
            <size>7887</size>
            <attacher name="Adrian Perez">aperez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjEzODU3CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0Mi9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViS2l0Mi9DaGFuZ2VMb2cKaW5kZXggMjExODE0M2IxMDI5MzFm
MGYwMzY5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
ZWYgdXNlckNvbnRlbnRFeHRlbnNpb25TdG9yZSwgV0tTdHJpbmdSZWYgaWRlbnRpZmllciwgV0tT
dHJpbmdSZWYganNvblNvdXJjZSwgdm9pZCogY29udGV4dCwgV0tVc2VyQ29udGVudEV4dGVuc2lv
blN0b3JlRmlsdGVyRnVuY3Rpb24gY2FsbGJhY2spOworV0tfRVhQT1JUIHZvaWQgV0tVc2VyQ29u
dGVudEV4dGVuc2lvblN0b3JlTG9va3VwRmlsdGVyKFdLVXNlckNvbnRlbnRFeHRlbnNpb25TdG9y
ZVJlZiB1c2VyQ29udGVudEV4dGVuc2lvblN0b3JlLCBXS1N0cmluZ1JlZiBpZGVudGlmaWVyLCB2
b2lkKiBjb250ZXh0LCBXS1VzZXJDb250ZW50RXh0ZW5zaW9uU3RvcmVGaWx0ZXJGdW5jdGlvbiBj
YWxsYmFjayk7CitXS19FWFBPUlQgdm9pZCBXS1VzZXJDb250ZW50RXh0ZW5zaW9uU3RvcmVSZW1v
dmVGaWx0ZXIoV0tVc2VyQ29udGVudEV4dGVuc2lvblN0b3JlUmVmIHVzZXJDb250ZW50RXh0ZW5z
aW9uU3RvcmUsIFdLU3RyaW5nUmVmIGlkZW50aWZpZXIsIHZvaWQqIGNvbnRleHQsIFdLVXNlckNv
bnRlbnRFeHRlbnNpb25TdG9yZUZpbHRlckZ1bmN0aW9uIGNhbGxiYWNrKTsKKwogI2lmZGVmIF9f
Y3BsdXNwbHVzCiB9CiAjZW5kaWYK
</data>
<flag name="review"
          id="325879"
          type_id="1"
          status="-"
          setter="mcatanzaro"
    />
          </attachment>
      

    </bug>

</bugzilla>