REGRESSION(r194846): [GTK] UI process crash visiting sites protected with HTTP auth...
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2016 16:34:01 +0000 (16:34 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Aug 2016 16:34:01 +0000 (16:34 +0000)
https://bugs.webkit.org/show_bug.cgi?id=161385

Reviewed by Antonio Gomes.

Since r194846, we are chaining up webkitWebViewBaseMotionNotifyEvent, but before GTK+ 3.14
GtkWidget::motion_notify_event was nullptr, so it can't be used unconditionally.

* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseMotionNotifyEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@205182 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/gtk/WebKitWebViewBase.cpp

index 55c7dd8..87b9aa7 100644 (file)
@@ -1,5 +1,18 @@
 2016-08-30  Carlos Garcia Campos  <cgarcia@igalia.com>
 
+        REGRESSION(r194846): [GTK] UI process crash visiting sites protected with HTTP auth when using GTK+ < 3.14
+        https://bugs.webkit.org/show_bug.cgi?id=161385
+
+        Reviewed by Antonio Gomes.
+
+        Since r194846, we are chaining up webkitWebViewBaseMotionNotifyEvent, but before GTK+ 3.14
+        GtkWidget::motion_notify_event was nullptr, so it can't be used unconditionally.
+
+        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
+        (webkitWebViewBaseMotionNotifyEvent):
+
+2016-08-30  Carlos Garcia Campos  <cgarcia@igalia.com>
+
         Unreviewed. Fix GTK+ build after r205150.
 
         * UIProcess/API/gtk/WebKitUserContentManager.cpp:
index 06af059..4e9d802 100644 (file)
@@ -806,8 +806,10 @@ static gboolean webkitWebViewBaseMotionNotifyEvent(GtkWidget* widget, GdkEventMo
     WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
     WebKitWebViewBasePrivate* priv = webViewBase->priv;
 
-    if (priv->authenticationDialog)
-        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->motion_notify_event(widget, event);
+    if (priv->authenticationDialog) {
+        auto* widgetClass = GTK_WIDGET_CLASS(webkit_web_view_base_parent_class);
+        return widgetClass->motion_notify_event ? widgetClass->motion_notify_event(widget, event) : FALSE;
+    }
 
     priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(reinterpret_cast<GdkEvent*>(event), 0 /* currentClickCount */));