Changeset 258829 in webkit


Ignore:
Timestamp:
Mar 23, 2020 3:16:21 AM (4 years ago)
Author:
youenn@apple.com
Message:

Explicitly activate the new DrawingAreaProxy on PSON navigation
https://bugs.webkit.org/show_bug.cgi?id=209232

Reviewed by Antti Koivisto.

Delay tree unfreezing for provisional pages until the main frame load is committed.
At that point, UIProcess is made aware and is doing the process swap.
We can thus unfreeze the tree so that UIProcess starts getting DrawAreaProxy messages.

This allows UIProcess to start listening to DrawAreaProxy messages at the time of doing process swapping in WebPageProxy.

  • UIProcess/DrawingAreaProxy.cpp:

(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::startReceivingMessages):

  • UIProcess/DrawingAreaProxy.h:
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::setDrawingArea):

  • WebProcess/WebPage/WebPage.cpp:

(WebKit::WebPage::didCompletePageTransition):
(WebKit::WebPage::didCommitLoad):

Location:
trunk/Source
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/loader/FrameLoaderStateMachine.h

    r258663 r258829  
    5252
    5353    WEBCORE_EXPORT bool committingFirstRealLoad() const;
    54     WEBCORE_EXPORT bool committedFirstRealDocumentLoad() const;
    55     bool creatingInitialEmptyDocument() const;
     54    bool committedFirstRealDocumentLoad() const;
     55    WEBCORE_EXPORT bool creatingInitialEmptyDocument() const;
    5656    WEBCORE_EXPORT bool isDisplayingInitialEmptyDocument() const;
    5757    WEBCORE_EXPORT bool firstLayoutDone() const;
  • trunk/Source/WebKit/ChangeLog

    r258821 r258829  
     12020-03-23  youenn fablet  <youenn@apple.com>
     2
     3        Explicitly activate the new DrawingAreaProxy on PSON navigation
     4        https://bugs.webkit.org/show_bug.cgi?id=209232
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Delay tree unfreezing for provisional pages until the main frame load is committed.
     9        At that point, UIProcess is made aware and is doing the process swap.
     10        We can thus unfreeze the tree so that UIProcess starts getting DrawAreaProxy messages.
     11
     12        This allows UIProcess to start listening to DrawAreaProxy messages at the time of doing process swapping in WebPageProxy.
     13
     14        * UIProcess/DrawingAreaProxy.cpp:
     15        (WebKit::DrawingAreaProxy::DrawingAreaProxy):
     16        (WebKit::DrawingAreaProxy::startReceivingMessages):
     17        * UIProcess/DrawingAreaProxy.h:
     18        * UIProcess/WebPageProxy.cpp:
     19        (WebKit::WebPageProxy::setDrawingArea):
     20        * WebProcess/WebPage/WebPage.cpp:
     21        (WebKit::WebPage::didCompletePageTransition):
     22        (WebKit::WebPage::didCommitLoad):
     23
    1242020-03-22  Wenson Hsieh  <wenson_hsieh@apple.com>
    225
  • trunk/Source/WebKit/UIProcess/DrawingAreaProxy.cpp

    r253346 r258829  
    4949#endif
    5050{
    51     process.addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_identifier, *this);
    5251}
    5352
    5453DrawingAreaProxy::~DrawingAreaProxy()
    5554{
    56     process().removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_identifier);
     55    if (m_startedReceivingMessages)
     56        process().removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_identifier);
     57}
     58
     59void DrawingAreaProxy::startReceivingMessages()
     60{
     61    m_startedReceivingMessages = true;
     62    process().addMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_identifier, *this);
    5763}
    5864
  • trunk/Source/WebKit/UIProcess/DrawingAreaProxy.h

    r258513 r258829  
    6161    DrawingAreaType type() const { return m_type; }
    6262    DrawingAreaIdentifier identifier() const { return m_identifier; }
     63
     64    void startReceivingMessages();
    6365
    6466    virtual void deviceScaleFactorDidChange() = 0;
     
    156158    virtual void exitAcceleratedCompositingMode(uint64_t /* backingStoreStateID */, const UpdateInfo&) { }
    157159#endif
     160    bool m_startedReceivingMessages { false };
    158161};
    159162
  • trunk/Source/WebKit/UIProcess/WebPageProxy.cpp

    r258792 r258829  
    10361036        return;
    10371037
     1038    m_drawingArea->startReceivingMessages();
     1039
    10381040#if ENABLE(ASYNC_SCROLLING) && PLATFORM(COCOA)
    10391041    if (m_drawingArea->type() == DrawingAreaTypeRemoteLayerTree) {
  • trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp

    r258804 r258829  
    33353335{
    33363336    unfreezeLayerTree(LayerTreeFreezeReason::PageTransition);
    3337 
    3338     auto& stateMachine = m_mainFrame->coreFrame()->loader().stateMachine();
    3339     RELEASE_LOG_IF_ALLOWED(Layers, "didCompletePageTransition: Did complete page transition, loader state is %d", stateMachine.stateForDebugging());
    3340 
    3341     if (stateMachine.committedFirstRealDocumentLoad())
    3342         unfreezeLayerTree(LayerTreeFreezeReason::ProcessSwap);
    33433337}
    33443338
     
    58665860        return;
    58675861
     5862    ASSERT(!frame->coreFrame()->loader().stateMachine().creatingInitialEmptyDocument());
     5863    unfreezeLayerTree(LayerTreeFreezeReason::ProcessSwap);
     5864
    58685865#if ENABLE(RESOURCE_LOAD_STATISTICS)
    58695866    clearLoadedThirdPartyDomains();
Note: See TracChangeset for help on using the changeset viewer.