WKThumbnailView should only use live layer trees before the snapshot arrives for...
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 22:38:21 +0000 (22:38 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 20 Jun 2014 22:38:21 +0000 (22:38 +0000)
commit040f43920a23cdaf632a7ad9396058d5baaff9f7
tree2827e4348df968dd87339841c798d918ef58b5a1
parent81cdbeade2e17b91e1b1be1898bb0762412db937
WKThumbnailView should only use live layer trees before the snapshot arrives for parented WKViews
https://bugs.webkit.org/show_bug.cgi?id=134129
<rdar://problem/17401591>

Reviewed by Anders Carlsson.

* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
Add a white background to WKThumbnailView, so that if we have no snapshot and no layer tree,
the view isn't transparent.

* UIProcess/API/mac/WKView.mm:
(-[WKView _updateThumbnailViewLayer]):
We currently pull the live layer tree into the WKThumbnailView even in snapshot mode,
before the snapshot arrives, to avoid flashing when transitioning a live WKView to a thumbnail view.
This is, however, not useful for unparented WKViews, because their layer tree will be detached
and we'll flash anyway. So, only do that when the WKView is parented.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@170216 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.mm
Source/WebKit2/UIProcess/API/mac/WKView.mm