From: Daniel Carl Date: Mon, 21 Oct 2013 17:23:52 +0000 (+0200) Subject: Removed the filtering for favicons. X-Git-Url: https://git.owens.tech/assets/static/git-logo.png/assets/static/git-logo.png/git?a=commitdiff_plain;h=cf60756754e3df0faeee26b64344dc5f3c25101d;p=vimb.git Removed the filtering for favicons. This should be solved in webkit itself or in a generic way with soup session. But at the moment it looks like this costs more cpu cycles instead of having a noticeable benefit. --- diff --git a/src/main.c b/src/main.c index 499cc62..d835899 100644 --- a/src/main.c +++ b/src/main.c @@ -65,9 +65,6 @@ static gboolean mimetype_decision_cb(WebKitWebView *webview, WebKitWebFrame *frame, WebKitNetworkRequest *request, char* mime_type, WebKitWebPolicyDecision *decision); static void download_progress_cp(WebKitDownload *download, GParamSpec *pspec); -static void request_start_cb(WebKitWebView *webview, WebKitWebFrame *frame, - WebKitWebResource *resource, WebKitNetworkRequest *request, - WebKitNetworkResponse *response); /* functions */ static void run_user_script(WebKitWebFrame *frame); @@ -727,7 +724,6 @@ static void setup_signals() "signal::title-changed", G_CALLBACK(title_changed_cb), NULL, "signal::mime-type-policy-decision-requested", G_CALLBACK(mimetype_decision_cb), NULL, "signal::download-requested", G_CALLBACK(vb_download), NULL, - "signal::resource-request-starting", G_CALLBACK(request_start_cb), NULL, "signal::should-show-delete-interface-for-element", G_CALLBACK(gtk_false), NULL, NULL ); @@ -944,19 +940,6 @@ gboolean vb_download(WebKitWebView *view, WebKitDownload *download, const char * return true; } -/** - * Callback to filter started resource request. - */ -static void request_start_cb(WebKitWebView *webview, WebKitWebFrame *frame, - WebKitWebResource *resource, WebKitNetworkRequest *request, - WebKitNetworkResponse *response) -{ - const char *uri = webkit_network_request_get_uri(request); - if (g_str_has_suffix(uri, "/favicon.ico")) { - webkit_network_request_set_uri(request, "about:blank"); - } -} - static void download_progress_cp(WebKitDownload *download, GParamSpec *pspec) { WebKitDownloadStatus status = webkit_download_get_status(download);