[Webkit-unassigned] [Bug 161450] [Cocoa] No reliable way to get a snapshot of WKWebView

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 9 14:05:36 PST 2017


https://bugs.webkit.org/show_bug.cgi?id=161450

--- Comment #52 from Beth Dakin <bdakin at apple.com> ---
(In reply to comment #51)
> Comment on attachment 301068 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=301068&action=review
> 
> > Source/WebKit2/ChangeLog:3
> > +        No reliable way to get a snapshot of WKWebView (macOS)
> 
> No need for the macOS in the title because you're adding cross-platform API
> 

Fixed.

> > Source/WebKit2/ChangeLog:13
> > +       It also adds a new API object WKSnapshotConfiguration.
> 
> This is indented wrong.
> 

Fixed.

> > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:233
> > +#if TARGET_OS_IPHONE
> > +- (void)takeSnapshotWithConfiguration:(WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void(^)(UIImage * _Nullable snapshotImage, NSError * _Nullable error))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
> > +#else
> > +- (void)takeSnapshotWithConfiguration:(WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void(^)(NSImage * _Nullable snapshotImage, NSError * _Nullable error))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
> > +#endif
> 
> I wonder if we should accept a null snapshotConfiguration and set
> rectInViewCoordinates to the bounds of the WKWebView and snapshotWidth to
> the width of the bounds of the WKWebView.

I like this! New patch incoming.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170209/3df6d88c/attachment-0001.html>


More information about the webkit-unassigned mailing list