REGRESSION (PSON): Flash on link navigation on Mac
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 18:18:52 +0000 (18:18 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Jan 2019 18:18:52 +0000 (18:18 +0000)
commit86403e4299db46e26941fd55e198604fc708dce2
treeffbbed8c65fae22afea5021dd4807fbd9451c7ce
parent2f21583141ad9dfff78322d2c4bbeee2e5420bd9
REGRESSION (PSON): Flash on link navigation on Mac
https://bugs.webkit.org/show_bug.cgi?id=193961
<rdar://problem/47482507>

Reviewed by Chris Dumez.

The target page sends EnterAcceleratedCompositingMode message too early, before we have a valid layer tree.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::attach): Deleted.

Not needed anymore.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::reinitializeWebPage):
(WebKit::WebPage::didCompletePageTransition):
(WebKit::m_shouldAttachDrawingAreaOnPageTransition): Deleted.

Move message sending logic fully to TiledCoreAnimationDrawingArea.
Unfreezing the layer tree is sufficient to trigger the message.

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

There is no need to treat process swap case differently.

(WebKit::TiledCoreAnimationDrawingArea::sendEnterAcceleratedCompositingModeIfNeeded):

Send this after the first successful layer flush with the root layer set.

(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::attach): Deleted.

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