diff options
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 24ba49222..3697315c4 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -49,6 +49,7 @@ #include "ephy-title-box.h" #include "ephy-title-widget.h" #include "ephy-type-builtins.h" +#include "ephy-web-app-utils.h" #include "ephy-web-view.h" #include "ephy-zoom.h" #include "popup-commands.h" @@ -1944,7 +1945,8 @@ decide_navigation_policy (WebKitWebView *web_view, referrer = (char *)g_object_get_data (G_OBJECT (window), "referrer"); - if (ephy_embed_utils_urls_have_same_origin (uri, referrer)) { + if (ephy_embed_utils_urls_have_same_origin (uri, referrer) || + ephy_web_application_is_uri_allowed (uri)) { gtk_widget_show (GTK_WIDGET (window)); } else { ephy_file_open_uri_in_default_browser (uri, GDK_CURRENT_TIME, @@ -1957,8 +1959,10 @@ decide_navigation_policy (WebKitWebView *web_view, } } - if (navigation_type == WEBKIT_NAVIGATION_TYPE_LINK_CLICKED) { - if (ephy_embed_utils_urls_have_same_origin (uri, webkit_web_view_get_uri (web_view))) { + if (navigation_type == WEBKIT_NAVIGATION_TYPE_LINK_CLICKED || + (navigation_type == WEBKIT_NAVIGATION_TYPE_OTHER && webkit_navigation_action_is_user_gesture (navigation_action))) { + if (ephy_embed_utils_urls_have_same_origin (uri, webkit_web_view_get_uri (web_view)) || + ephy_web_application_is_uri_allowed (uri)) { return FALSE; } |