Title: [237615] trunk/Source/WebKit
Revision
237615
Author
[email protected]
Date
2018-10-30 19:27:51 -0700 (Tue, 30 Oct 2018)

Log Message

[PSON] View gesture snapshot gets taken down early when process-swapping
https://bugs.webkit.org/show_bug.cgi?id=191083
<rdar://problem/45058738>

Reviewed by Alex Christensen.

When process-swapping, we would call WebViewImpl::processDidExit(), which would destroy
the ViewGestureController and thus take down the swipe navigation snapshot before it
should. We now call WebViewImpl::processDidSwap() instead, which does the same thing,
except for destroying the ViewGestureController. As a result, the view snapshot stays
visible as long as it is needed, even in case of process swap.

* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::handleProcessSwapOrExit):
(WebKit::WebViewImpl::processWillSwap):
(WebKit::WebViewImpl::processDidExit):
* UIProcess/mac/PageClientImplMac.mm:
(WebKit::PageClientImpl::processWillSwap):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (237614 => 237615)


--- trunk/Source/WebKit/ChangeLog	2018-10-31 02:27:12 UTC (rev 237614)
+++ trunk/Source/WebKit/ChangeLog	2018-10-31 02:27:51 UTC (rev 237615)
@@ -1,5 +1,27 @@
 2018-10-30  Chris Dumez  <[email protected]>
 
+        [PSON] View gesture snapshot gets taken down early when process-swapping
+        https://bugs.webkit.org/show_bug.cgi?id=191083
+        <rdar://problem/45058738>
+
+        Reviewed by Alex Christensen.
+
+        When process-swapping, we would call WebViewImpl::processDidExit(), which would destroy
+        the ViewGestureController and thus take down the swipe navigation snapshot before it
+        should. We now call WebViewImpl::processDidSwap() instead, which does the same thing,
+        except for destroying the ViewGestureController. As a result, the view snapshot stays
+        visible as long as it is needed, even in case of process swap.
+
+        * UIProcess/Cocoa/WebViewImpl.h:
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::handleProcessSwapOrExit):
+        (WebKit::WebViewImpl::processWillSwap):
+        (WebKit::WebViewImpl::processDidExit):
+        * UIProcess/mac/PageClientImplMac.mm:
+        (WebKit::PageClientImpl::processWillSwap):
+
+2018-10-30  Chris Dumez  <[email protected]>
+
         [PSON] WebView renders with incorrect dimensions after back or forward
         https://bugs.webkit.org/show_bug.cgi?id=191071
         <rdar://problem/45058950>

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h (237614 => 237615)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h	2018-10-31 02:27:12 UTC (rev 237614)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h	2018-10-31 02:27:51 UTC (rev 237615)
@@ -160,6 +160,7 @@
 
     WebPageProxy& page() { return m_page.get(); }
 
+    void processWillSwap();
     void processDidExit();
     void pageClosed();
     void didRelaunchProcess();
@@ -653,6 +654,8 @@
     void mouseUpInternal(NSEvent *);
     void mouseDraggedInternal(NSEvent *);
 
+    void handleProcessSwapOrExit();
+
     bool mightBeginDragWhileInactive();
     bool mightBeginScrollWhileInactive();
 

Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (237614 => 237615)


--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2018-10-31 02:27:12 UTC (rev 237614)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm	2018-10-31 02:27:51 UTC (rev 237615)
@@ -1456,7 +1456,7 @@
     return [m_view window];
 }
 
-void WebViewImpl::processDidExit()
+void WebViewImpl::handleProcessSwapOrExit()
 {
     dismissContentRelativeChildWindowsWithAnimation(true);
 
@@ -1464,7 +1464,16 @@
 
     updateRemoteAccessibilityRegistration(false);
     flushPendingMouseEventCallbacks();
+}
 
+void WebViewImpl::processWillSwap()
+{
+    handleProcessSwapOrExit();
+}
+
+void WebViewImpl::processDidExit()
+{
+    handleProcessSwapOrExit();
     m_gestureController = nullptr;
 }
 

Modified: trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm (237614 => 237615)


--- trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm	2018-10-31 02:27:12 UTC (rev 237614)
+++ trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm	2018-10-31 02:27:51 UTC (rev 237615)
@@ -255,8 +255,7 @@
 
 void PageClientImpl::processWillSwap()
 {
-    // FIXME: It didn't really exit.
-    m_impl->processDidExit();
+    m_impl->processWillSwap();
 }
 
 void PageClientImpl::processDidExit()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to