[PSON] Flash of blank content while transitioning from page A to page B.
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jan 2019 18:23:22 +0000 (18:23 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jan 2019 18:23:22 +0000 (18:23 +0000)
commit290ad793387269be970f1855847576f236931628
tree2a29f88fad1b72046f438a4e1e062bd03d2b82a8
parent4fe9c21149b8e82554720d7ae4b7dcb7c2fcb158
[PSON] Flash of blank content while transitioning from page A to page B.
https://bugs.webkit.org/show_bug.cgi?id=193283

Reviewed by Chris Dumez.

Layer tree is not frozen during WebPage construction. If the flush timer (started for the initial
empty document) manages to run before the actual page load starts, we'll get a flash.

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode const):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:

Rename shouldDelayAttachingDrawingArea bit to isSwapFromSuspended and make it available on all platforms.

* UIProcess/RemoteLayerTree/mac/ScrollerMac.h: Removed.
* UIProcess/RemoteLayerTree/mac/ScrollerMac.mm: Removed.
* UIProcess/RemoteLayerTree/mac/ScrollerPairMac.h: Removed.
* UIProcess/RemoteLayerTree/mac/ScrollerPairMac.mm: Removed.
* UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.cpp: Removed.
* UIProcess/RemoteLayerTree/mac/ScrollingTreeFrameScrollingNodeRemoteMac.h: Removed.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::swapToWebProcess):
(WebKit::WebPageProxy::finishAttachingToWebProcess):
(WebKit::WebPageProxy::initializeWebPage):
(WebKit::WebPageProxy::continueNavigationInNewProcess):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::m_shouldAttachDrawingAreaOnPageTransition):

Freeze the layer tree in WebPage constructor if this is a swap from a suspended process.

(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::didCompletePageTransition):

Unfreeze on first non-initial empty document page transition.

* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239777 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Shared/WebPageCreationParameters.cpp
Source/WebKit/Shared/WebPageCreationParameters.h
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm