[hackers] Re: [surf][PATCH] Implement RefererPolicies
commit fd32842d76612f9505631281f6d23511792740ef
Author: nzl <uruabi_AT_gmail.com>
Date: Mon Nov 19 13:28:04 2018 +0000
Pass initial refererpolicy to webextension
diff --git a/libsurf-webext.c b/libsurf-webext.c
index 1bc8da7..06730da 100644
--- a/libsurf-webext.c
+++ b/libsurf-webext.c
_AT_@ -173,10 +173,9 @@
webkit_web_extension_initialize_with_user_data(WebKitWebExtension *e,
GVariant *
{
GIOChannel *gchanpipe;
- refererpolicy = 'E';
g_signal_connect(e, "page-created", G_CALLBACK(webpagecreated), NULL);
- g_variant_get(gv, "(ii)", &pipein, &pipeout);
+ g_variant_get(gv, "(iii)", &pipein, &pipeout, &refererpolicy);
msgsurf(NULL, "i");
gchanpipe = g_io_channel_unix_new(pipein);
diff --git a/surf.c b/surf.c
index b753cf0..f935849 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -1240,11 +1240,13 @@ void
initwebextensions(WebKitWebContext *wc, Client *c)
{
GVariant *gv;
+ int r;
if (!pipeout[0] || !pipein[1])
return;
- gv = g_variant_new("(ii)", pipeout[0], pipein[1]);
+ r = ((char *)curconfig[RefererPolicies].val.v)[refererpolicy];
+ gv = g_variant_new("(iii)", pipeout[0], pipein[1], r);
webkit_web_context_set_web_extensions_initialization_user_data(wc, gv);
webkit_web_context_set_web_extensions_directory(wc, WEBEXTDIR);
Received on Mon Nov 19 2018 - 14:33:25 CET
This archive was generated by hypermail 2.3.0
: Mon Nov 19 2018 - 14:36:23 CET