[PSON] Flash on back navigation on Mac
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 17:43:02 +0000 (17:43 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Jan 2019 17:43:02 +0000 (17:43 +0000)
commit4cb2757b9369b920d46fb62a60f9973004565efe
tree960a17492ef5604a5750bf7702d0b9f802ff8fbf
parent4c026eda97cf0e141e385f404f806bcf3792731c
[PSON] Flash on back navigation on Mac
https://bugs.webkit.org/show_bug.cgi?id=193716
<rdar://problem/47148458>

Reviewed by Chris Dumez.

We close the page immediately if we fail to suspend. Layers disappear and we get a flash.

* UIProcess/SuspendedPageProxy.cpp:
(WebKit::SuspendedPageProxy::didProcessRequestToSuspend):

Remove the suspended page (so closing it on web process side) if the suspension fails.
Skip this if we are using web process side compositing on Mac.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::enterAcceleratedCompositingMode):

On Mac, remove failed SuspendedPageProxy when entering compositing mode. At this point we don't need it to keep layers alive.

* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::removeFailedSuspendedPagesForPage):
* UIProcess/WebProcessPool.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::suspendForProcessSwap):

Don't close the page on suspension failure.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/SuspendedPageProxy.cpp
Source/WebKit/UIProcess/WebPageProxy.cpp
Source/WebKit/UIProcess/WebProcessPool.cpp
Source/WebKit/UIProcess/WebProcessPool.h
Source/WebKit/WebProcess/WebPage/WebPage.cpp