From ce026b9692c23cecd28af4dceac305ccff6f14f7 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Wed, 31 Oct 2012 01:28:57 +0000 Subject: Don't show error page when plugin will handle - SL #3934 Allow a plugin to handle the request without showing the error page. Signed-off-by: Manuel Kaufmann Acked-by: Manuel QuiƱones --- diff --git a/browser.py b/browser.py index efcd5c7..39a304d 100644 --- a/browser.py +++ b/browser.py @@ -653,9 +653,12 @@ class Browser(WebKit.WebView): """Show Sugar's error page""" # Don't show error page if the load was interrupted by policy - # change. For example, if a file was requested for download - if web_error.code == WebKit.PolicyError.\ - FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE: + # change or the request is going to be handled by a + # plugin. For example, if a file was requested for download or + # an .ogg file is going to be played. + if web_error.code in (WebKit.PolicyError.\ + FRAME_LOAD_INTERRUPTED_BY_POLICY_CHANGE, + WebKit.PluginError.WILL_HANDLE_LOAD): return True data = { -- cgit v0.9.1