<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [WK2] Missing C API for UserContentExtensionStore prevents instantiating content extensions"
href="https://bugs.webkit.org/show_bug.cgi?id=169037#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [WK2] Missing C API for UserContentExtensionStore prevents instantiating content extensions"
href="https://bugs.webkit.org/show_bug.cgi?id=169037">bug 169037</a>
from <span class="vcard"><a class="email" href="mailto:aperez@igalia.com" title="Adrian Perez <aperez@igalia.com>"> <span class="fn">Adrian Perez</span></a>
</span></b>
<pre>I have already a WIP patch for this, as a side effect of working on
<a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Enable CONTENT_EXTENSIONS and fix the build with it enabled"
href="show_bug.cgi?id=167941">bug #167941</a> 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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>