Unreviewed, rolling out r244648.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Apr 2019 12:24:02 +0000 (12:24 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Apr 2019 12:24:02 +0000 (12:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197363

 Lots of tests  are crashing (Requested by KaL on #webkit).

Reverted changeset:

"[GTK] Back/forward gesture snapshot always times out"
https://bugs.webkit.org/show_bug.cgi?id=197233
https://trac.webkit.org/changeset/244648

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/glib/WebKitWebView.cpp
Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h

index d66faca..1758043 100644 (file)
@@ -1,3 +1,16 @@
+2019-04-29  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r244648.
+        https://bugs.webkit.org/show_bug.cgi?id=197363
+
+         Lots of tests  are crashing (Requested by KaL on #webkit).
+
+        Reverted changeset:
+
+        "[GTK] Back/forward gesture snapshot always times out"
+        https://bugs.webkit.org/show_bug.cgi?id=197233
+        https://trac.webkit.org/changeset/244648
+
 2019-04-29  Michael Catanzaro  <mcatanzaro@igalia.com>
 
         [WPE][GTK] window-object-cleared documentation should reference webkit_frame_get_js_context_for_script_world()
index 887f7b3..af10d68 100644 (file)
@@ -514,7 +514,11 @@ static void userAgentChanged(WebKitSettings* settings, GParamSpec*, WebKitWebVie
 static void enableBackForwardNavigationGesturesChanged(WebKitSettings* settings, GParamSpec*, WebKitWebView* webView)
 {
     gboolean enable = webkit_settings_get_enable_back_forward_navigation_gestures(settings);
-    webkitWebViewBaseSetEnableBackForwardNavigationGesture(WEBKIT_WEB_VIEW_BASE(webView), enable);
+
+    ViewGestureController& controller = webkitWebViewBaseViewGestureController(WEBKIT_WEB_VIEW_BASE(webView));
+    controller.setSwipeGestureEnabled(enable);
+
+    getPage(webView).setShouldRecordNavigationSnapshots(enable);
 }
 
 static void webkitWebViewUpdateFavicon(WebKitWebView* webView, cairo_surface_t* favicon)
index 5e6f6f6..816f0fa 100644 (file)
@@ -206,7 +206,6 @@ struct _WebKitWebViewBasePrivate {
     std::unique_ptr<GestureController> gestureController;
 #endif
     std::unique_ptr<ViewGestureController> viewGestureController;
-    bool isBackForwardNavigationGestureEnabled { false };
 };
 
 WEBKIT_DEFINE_TYPE(WebKitWebViewBase, webkit_web_view_base, GTK_TYPE_CONTAINER)
@@ -1190,18 +1189,6 @@ GestureController& webkitWebViewBaseGestureController(WebKitWebViewBase* webView
 }
 #endif
 
-void webkitWebViewBaseSetEnableBackForwardNavigationGesture(WebKitWebViewBase* webViewBase, bool enabled)
-{
-    WebKitWebViewBasePrivate* priv = webViewBase->priv;
-
-    priv->isBackForwardNavigationGestureEnabled = enabled;
-
-    if (priv->pageProxy->hasRunningProcess())
-        webViewBase->priv->viewGestureController->setSwipeGestureEnabled(enabled);
-
-    priv->pageProxy->setShouldRecordNavigationSnapshots(enabled);
-}
-
 ViewGestureController& webkitWebViewBaseViewGestureController(WebKitWebViewBase* webViewBase)
 {
     return *webViewBase->priv->viewGestureController;
@@ -1433,6 +1420,8 @@ void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, Ref<AP
     priv->pageProxy->setIntrinsicDeviceScaleFactor(gtk_widget_get_scale_factor(GTK_WIDGET(webkitWebViewBase)));
     g_signal_connect(webkitWebViewBase, "notify::scale-factor", G_CALLBACK(deviceScaleFactorChanged), nullptr);
 #endif
+
+    priv->viewGestureController = std::make_unique<WebKit::ViewGestureController>(*priv->pageProxy);
 }
 
 void webkitWebViewBaseSetTooltipText(WebKitWebViewBase* webViewBase, const char* tooltip)
@@ -1650,12 +1639,11 @@ void webkitWebViewBaseDidRelaunchWebProcess(WebKitWebViewBase* webkitWebViewBase
     // Queue a resize to ensure the new DrawingAreaProxy is resized.
     gtk_widget_queue_resize_no_redraw(GTK_WIDGET(webkitWebViewBase));
 
-    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
-
 #if PLATFORM(X11) && USE(TEXTURE_MAPPER_GL) && !USE(REDIRECTED_XCOMPOSITE_WINDOW)
     if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::X11)
         return;
 
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
     auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(priv->pageProxy->drawingArea());
     ASSERT(drawingArea);
 
@@ -1667,9 +1655,6 @@ void webkitWebViewBaseDidRelaunchWebProcess(WebKitWebViewBase* webkitWebViewBase
 #else
     UNUSED_PARAM(webkitWebViewBase);
 #endif
-
-    priv->viewGestureController = std::make_unique<WebKit::ViewGestureController>(*priv->pageProxy);
-    priv->viewGestureController->setSwipeGestureEnabled(priv->isBackForwardNavigationGestureEnabled);
 }
 
 void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase)
index 10df80b..1360285 100644 (file)
@@ -84,7 +84,6 @@ WebKit::GestureController& webkitWebViewBaseGestureController(WebKitWebViewBase*
 
 RefPtr<WebKit::ViewSnapshot> webkitWebViewBaseTakeViewSnapshot(WebKitWebViewBase*);
 
-void webkitWebViewBaseSetEnableBackForwardNavigationGesture(WebKitWebViewBase*, bool enabled);
 WebKit::ViewGestureController& webkitWebViewBaseViewGestureController(WebKitWebViewBase*);
 
 void webkitWebViewBaseDidStartProvisionalLoadForMainFrame(WebKitWebViewBase*);