Changeset 237615 in webkit


Ignore:
Timestamp:
Oct 30, 2018 7:27:51 PM (5 years ago)
Author:
Chris Dumez
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):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r237614 r237615  
     12018-10-30  Chris Dumez  <cdumez@apple.com>
     2
     3        [PSON] View gesture snapshot gets taken down early when process-swapping
     4        https://bugs.webkit.org/show_bug.cgi?id=191083
     5        <rdar://problem/45058738>
     6
     7        Reviewed by Alex Christensen.
     8
     9        When process-swapping, we would call WebViewImpl::processDidExit(), which would destroy
     10        the ViewGestureController and thus take down the swipe navigation snapshot before it
     11        should. We now call WebViewImpl::processDidSwap() instead, which does the same thing,
     12        except for destroying the ViewGestureController. As a result, the view snapshot stays
     13        visible as long as it is needed, even in case of process swap.
     14
     15        * UIProcess/Cocoa/WebViewImpl.h:
     16        * UIProcess/Cocoa/WebViewImpl.mm:
     17        (WebKit::WebViewImpl::handleProcessSwapOrExit):
     18        (WebKit::WebViewImpl::processWillSwap):
     19        (WebKit::WebViewImpl::processDidExit):
     20        * UIProcess/mac/PageClientImplMac.mm:
     21        (WebKit::PageClientImpl::processWillSwap):
     22
    1232018-10-30  Chris Dumez  <cdumez@apple.com>
    224
  • trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.h

    r237110 r237615  
    161161    WebPageProxy& page() { return m_page.get(); }
    162162
     163    void processWillSwap();
    163164    void processDidExit();
    164165    void pageClosed();
     
    654655    void mouseDraggedInternal(NSEvent *);
    655656
     657    void handleProcessSwapOrExit();
     658
    656659    bool mightBeginDragWhileInactive();
    657660    bool mightBeginScrollWhileInactive();
  • trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm

    r237087 r237615  
    14571457}
    14581458
    1459 void WebViewImpl::processDidExit()
     1459void WebViewImpl::handleProcessSwapOrExit()
    14601460{
    14611461    dismissContentRelativeChildWindowsWithAnimation(true);
     
    14651465    updateRemoteAccessibilityRegistration(false);
    14661466    flushPendingMouseEventCallbacks();
    1467 
     1467}
     1468
     1469void WebViewImpl::processWillSwap()
     1470{
     1471    handleProcessSwapOrExit();
     1472}
     1473
     1474void WebViewImpl::processDidExit()
     1475{
     1476    handleProcessSwapOrExit();
    14681477    m_gestureController = nullptr;
    14691478}
  • trunk/Source/WebKit/UIProcess/mac/PageClientImplMac.mm

    r236257 r237615  
    256256void PageClientImpl::processWillSwap()
    257257{
    258     // FIXME: It didn't really exit.
    259     m_impl->processDidExit();
     258    m_impl->processWillSwap();
    260259}
    261260
Note: See TracChangeset for help on using the changeset viewer.