[epiphany] Revert "web-view: Remove handling of plugin errors"



commit f114ddbf4ee873f2baa454e8b2d3e990b4fbfc84
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Thu Sep 3 13:20:30 2020 +0000

    Revert "web-view: Remove handling of plugin errors"
    
    This reverts commit 868de06fca4018bb5eaf61bed8dd8c952e813ec2

 embed/ephy-web-view.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 5b80cb5ef..5f30abf49 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -2282,7 +2282,8 @@ 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_POLICY_ERROR &&
+      error->domain != WEBKIT_PLUGIN_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
@@ -2299,6 +2300,11 @@ 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: {
@@ -2308,14 +2314,17 @@ 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]