]> git.eshelyaron.com Git - emacs.git/commitdiff
Rationalize creation decisions
authorPo Lu <luangruo@yahoo.com>
Sat, 6 Nov 2021 13:11:51 +0000 (21:11 +0800)
committerLars Ingebrigtsen <larsi@gnus.org>
Sun, 7 Nov 2021 01:59:42 +0000 (02:59 +0100)
* src/xwidget.c (webkit_create_cb): Only create a new widget if type
is OTHER.

src/xwidget.c

index 0a6d95a15730c6e0d69ead6ed3ae44916963cba4..bf69f262fb733149d14b7a85f790bf3f193f1fd4 100644 (file)
@@ -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;
     }