[epiphany/mcatanzaro/plugin-errors] web-view: Remove handling of plugin errors
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/mcatanzaro/plugin-errors] web-view: Remove handling of plugin errors
- Date: Sun, 30 Aug 2020 14:55:10 +0000 (UTC)
commit 5086c22e83f8e35d7a2d69a1ca38f67625041a1b
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sun Aug 30 09:53:47 2020 -0500
web-view: Remove handling of plugin errors
WebKitGTK trunk no longer supports plugins, and our use of the plugin
error types is causing a deprecation warning:
[103/281] Compiling C object embed/libephyembed.a.p/ephy-web-view.c.o
../../../../Projects/epiphany/embed/ephy-web-view.c: In function ‘load_failed_cb’:
../../../../Projects/epiphany/embed/ephy-web-view.c:2286:7: warning: ‘webkit_plugin_error_quark’ is
deprecated [-Wdeprecated-declarations]
2286 | error->domain != WEBKIT_PLUGIN_ERROR) {
| ^~~~~
In file included from /home/mcatanzaro/Projects/GNOME/install/include/webkitgtk-4.0/webkit2/webkit2.h:46,
from ../../../../Projects/epiphany/embed/ephy-web-view.h:24,
from ../../../../Projects/epiphany/embed/ephy-web-view.c:23:
/home/mcatanzaro/Projects/GNOME/install/include/webkitgtk-4.0/webkit2/WebKitError.h:164:1: note: declared
here
164 | webkit_plugin_error_quark (void);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
Since we already disable plugins, there's no need to check for plugin
errors anymore.
Note this also adjusts the position of a break statement to improve
readability (no functional change).
embed/ephy-web-view.c | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 5f30abf49..5b80cb5ef 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2282,8 +2282,7 @@ load_failed_cb (WebKitWebView *web_view,
ephy_web_view_set_link_message (view, NULL);
if (error->domain != WEBKIT_NETWORK_ERROR &&
- error->domain != WEBKIT_POLICY_ERROR &&
- error->domain != WEBKIT_PLUGIN_ERROR) {
+ error->domain != WEBKIT_POLICY_ERROR) {
if (view->address && g_str_has_prefix (view->address, "file:"))
ephy_web_view_load_error_page (view, uri, EPHY_WEB_VIEW_ERROR_NO_SUCH_FILE, error, NULL);
else
@@ -2300,11 +2299,6 @@ load_failed_cb (WebKitWebView *web_view,
case WEBKIT_POLICY_ERROR_CANNOT_SHOW_MIME_TYPE:
case WEBKIT_POLICY_ERROR_CANNOT_SHOW_URI:
case WEBKIT_POLICY_ERROR_CANNOT_USE_RESTRICTED_PORT:
- case WEBKIT_PLUGIN_ERROR_FAILED:
- case WEBKIT_PLUGIN_ERROR_CANNOT_FIND_PLUGIN:
- case WEBKIT_PLUGIN_ERROR_CANNOT_LOAD_PLUGIN:
- case WEBKIT_PLUGIN_ERROR_JAVA_UNAVAILABLE:
- case WEBKIT_PLUGIN_ERROR_CONNECTION_CANCELLED:
ephy_web_view_load_error_page (view, uri, EPHY_WEB_VIEW_ERROR_PAGE_NETWORK_ERROR, error, NULL);
return TRUE;
case WEBKIT_NETWORK_ERROR_CANCELLED: {
@@ -2314,17 +2308,14 @@ load_failed_cb (WebKitWebView *web_view,
prev_uri = webkit_web_view_get_uri (web_view);
ephy_web_view_set_address (view, prev_uri);
}
+ break;
}
- break;
case WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE:
/* If we are going to download something, and this is the first
* page to load in this tab, we may want to close it down. */
if (!view->ever_committed)
g_signal_emit_by_name (view, "download-only-load", NULL);
break;
- /* In case the resource is going to be showed with a plugin just let
- * WebKit do it */
- case WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD:
default:
break;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]