In some cases, clients of WKThumbnailView might want to use snapshots of the web content for performance reasons. <rdar://problem/16255139>
Created attachment 226916 [details] patch
Comment on attachment 226916 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=226916&action=review > Source/WebCore/WebCore.exp.in:791 > +__ZN7WebCore19MediaSessionManager9addClientEPNS_25MediaSessionManagerClientE hmm, sort-export-file seems to have made a mistake
(In reply to comment #2) > (From update of attachment 226916 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=226916&action=review > > > Source/WebCore/WebCore.exp.in:791 > > +__ZN7WebCore19MediaSessionManager9addClientEPNS_25MediaSessionManagerClientE > > hmm, sort-export-file seems to have made a mistake I guess it just sorts alphabetically :|
Created attachment 226921 [details] rebase
Comment on attachment 226921 [details] rebase View in context: https://bugs.webkit.org/attachment.cgi?id=226921&action=review > Source/WebKit2/ChangeLog:22 > + If we're using snapshots, and haven't already dispatched a async snapshot request, an async > Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm:107 > + _pendingSnapshot = YES; _pendingSnapshot is a confusing variable name. Is it the pending snapshot, that a snapshot is pending, or that that this view is pending being snapshat? > Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm:116 > + [thumbnailView _setPendingSnapshot:NO]; > + [[thumbnailView layer] setSublayers:@[ ]]; > + [[thumbnailView layer] setContents:(id)cgImage.get()]; Why doesn't this just call a single method on the thumbnail view? > Source/WebKit2/UIProcess/API/mac/WKView.mm:2503 > + _data->_currentRootLayer = rootLayer; What is the "current" supposed to imply? > Source/WebKit2/WebProcess/WebPage/DrawingArea.h:110 > + virtual WebCore::TransformationMatrix transform() const; This name is rather generic. What does the transform do?
Comment on attachment 226921 [details] rebase View in context: https://bugs.webkit.org/attachment.cgi?id=226921&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h:42 > +@property (nonatomic) BOOL useSnapshot; Why not usesSnapshot?
https://trac.webkit.org/r165748