[Webkit-unassigned] [Bug 216123] [GTK][WPE] WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD returned when plugins are disabled

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 9 07:14:38 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=216123

--- Comment #7 from Michael Catanzaro <mcatanzaro at gnome.org> ---
I added debug. What happens with WebKit trunk is:

** (epiphany:26619): WARNING **: 08:54:24.839: LOAD STARTED: https://gnome.modular.im/_matrix/media/r0/download/gnome.modular.im/c7fc680ae099cbd40063a50c81c944a9e26c4922/Peek

** (epiphany:26619): WARNING **: 08:54:25.524: LOAD COMMITTED: https://gnome.modular.im/_matrix/media/r0/download/gnome.modular.im/c7fc680ae099cbd40063a50c81c944a9e26c4922/Peek

** (epiphany:26619): WARNING **: 08:54:26.577: LOAD FAILED: https://gnome.modular.im/_matrix/media/r0/download/gnome.modular.im/c7fc680ae099cbd40063a50c81c944a9e26c4922/Peek

** (epiphany:26619): WARNING **: 08:54:26.578: LOAD FINISHED: https://gnome.modular.im/_matrix/media/r0/download/gnome.modular.im/c7fc680ae099cbd40063a50c81c944a9e26c4922/Peek

** (epiphany:26619): WARNING **: 08:54:26.582: LOAD STARTED: https://gnome.modular.im/_matrix/media/r0/download/gnome.modular.im/c7fc680ae099cbd40063a50c81c944a9e26c4922/Peek

** (epiphany:26619): WARNING **: 08:54:26.591: LOAD COMMITTED: https://gnome.modular.im/_matrix/media/r0/download/gnome.modular.im/c7fc680ae099cbd40063a50c81c944a9e26c4922/Peek

** (epiphany:26619): WARNING **: 08:54:26.592: LOAD FINISHED: https://gnome.modular.im/_matrix/media/r0/download/gnome.modular.im/c7fc680ae099cbd40063a50c81c944a9e26c4922/Peek

So: we start load, fail load, finish load, then do it all over. With WebKitGTK 2.29.92, WebKit displays the media controls, but the media controls are broken and unable to actually play the media due to bug #183259. That's the behavior we want to get back to. But with WebKitGTK trunk, Epiphany displays an error: "Plug-in handled load." That's a WebKit error page, though, not the fancy Epiphany error page. If I check out Epiphany commit https://gitlab.gnome.org/GNOME/epiphany/-/commit/868de06fca4018bb5eaf61bed8dd8c952e813ec2 then I get the same with a fancy Epiphany error page. So just changing the error domain will not be enough to fix this bug, because something else is wrong inside WebKit. I tried this:

diff --git a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
index 191007b6bb66..bb6c1618fbe5 100644
--- a/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
+++ b/Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
@@ -470,7 +470,8 @@ void WebKitWebViewClient::didReceiveUserMessage(WKWPE::View&, UserMessage&& mess
 static gboolean webkitWebViewLoadFail(WebKitWebView* webView, WebKitLoadEvent, const char* failingURI, GError* error)
 {
     if (g_error_matches(error, WEBKIT_NETWORK_ERROR, WEBKIT_NETWORK_ERROR_CANCELLED)
-        || g_error_matches(error, WEBKIT_POLICY_ERROR, WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE))
+        || g_error_matches(error, WEBKIT_POLICY_ERROR, WEBKIT_POLICY_ERROR_FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE)
+        || g_error_matches(error, WEBKIT_POLICY_ERROR, WEBKIT_PLUGIN_ERROR_WILL_HANDLE_LOAD))
         return FALSE;

     GUniquePtr<char> htmlString(g_strdup_printf("<html><body>%s</body></html>", error->message));

But that wasn't enough to make it work.

I think desired behavior would be load started -> load committed -> load finished, once, without any errors. But on the other hand, I'm also aware that attempting to paper over internal WebKit loader behavior at the API level has caused very tricky bugs in the past, so it's probably risky to try changing that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200909/dd957b76/attachment.htm>


More information about the webkit-unassigned mailing list