From 686ce501cb54ce64cabb3411cac2b3f0ea936c49 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 6 Nov 2021 21:11:51 +0800 Subject: [PATCH] Rationalize creation decisions * src/xwidget.c (webkit_create_cb): Only create a new widget if type is OTHER. --- src/xwidget.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/xwidget.c b/src/xwidget.c index 0a6d95a1573..bf69f262fb7 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -1012,16 +1012,13 @@ webkit_create_cb (WebKitWebView *webview, switch (webkit_navigation_action_get_navigation_type (nav_action)) { case WEBKIT_NAVIGATION_TYPE_OTHER: - if (webkit_navigation_action_is_user_gesture (nav_action)) - return NULL; - return webkit_create_cb_1 (webview, user_data); - case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED: - case WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED: + case WEBKIT_NAVIGATION_TYPE_BACK_FORWARD: case WEBKIT_NAVIGATION_TYPE_RELOAD: + case WEBKIT_NAVIGATION_TYPE_FORM_SUBMITTED: case WEBKIT_NAVIGATION_TYPE_FORM_RESUBMITTED: - return webkit_create_cb_1 (webview, user_data); + case WEBKIT_NAVIGATION_TYPE_LINK_CLICKED: default: return NULL; } -- 2.39.2