Bug 150106 - _WKThumbnailView should support a snapshot-only mode
Summary: _WKThumbnailView should support a snapshot-only mode
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Conrad Shultz
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-10-13 16:23 PDT by Conrad Shultz
Modified: 2015-10-20 18:11 PDT (History)
3 users (show)

See Also:


Attachments
Patch (5.81 KB, patch)
2015-10-14 13:51 PDT, Conrad Shultz
thorton: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Shultz 2015-10-13 16:23:09 PDT
Currently _WKThumbnailView works by reparenting the layer tree of the associated WKView, then snapshotting it.

It would be helpful to have a mode where it can simply snapshot the WKView without impacting the layer tree or blocking interaction with the WKView.
Comment 1 Radar WebKit Bug Importer 2015-10-13 16:23:59 PDT
<rdar://problem/23099438>
Comment 2 Conrad Shultz 2015-10-14 13:51:05 PDT
Created attachment 263105 [details]
Patch
Comment 3 Tim Horton 2015-10-14 14:01:15 PDT
Comment on attachment 263105 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=263105&action=review

> Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.h:42
> +@property (nonatomic) BOOL exclusivelyUsesSnapshot;

I don't know if this is how we should word this, because if e.g. we managed to have a layer tree in two places at once, or something crazy like that, we could get the behavior you want (WKView left undisturbed) without sacrificing the instantaneous-ness/no-flashyness of WKThumbnailView.

Maybe it should be about the difference in the WKView's behavior?
Comment 4 Conrad Shultz 2015-10-14 14:55:08 PDT
(In reply to comment #3)
> Comment on attachment 263105 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=263105&action=review
> 
> > Source/WebKit2/UIProcess/API/Cocoa/_WKThumbnailView.h:42
> > +@property (nonatomic) BOOL exclusivelyUsesSnapshot;
> 
> I don't know if this is how we should word this, because if e.g. we managed
> to have a layer tree in two places at once, or something crazy like that, we
> could get the behavior you want (WKView left undisturbed) without
> sacrificing the instantaneous-ness/no-flashyness of WKThumbnailView.
> 
> Maybe it should be about the difference in the WKView's behavior?

That's a good point, but I am having trouble thinking up a good name.

allowsInteractionWithWKView?
canCoexistWithWKView?
Comment 5 Conrad Shultz 2015-10-20 18:11:11 PDT
Committed r191366: <http://trac.webkit.org/changeset/191366>