+2014-06-20 Timothy Horton <timothy_horton@apple.com>
+
+ 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.
+
2014-06-20 Geoffrey Garen <ggaren@apple.com>
WebKit delegate methods should document their default behaviors
_WKThumbnailView *thumbnailView = _data->_thumbnailView;
ASSERT(thumbnailView);
- if (!thumbnailView.usesSnapshot || thumbnailView._waitingForSnapshot)
+ if (!thumbnailView.usesSnapshot || (thumbnailView._waitingForSnapshot && self.window))
[self _reparentLayerTreeInThumbnailView];
}