<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [Cocoa] No reliable way to get a snapshot of WKWebView"
href="https://bugs.webkit.org/show_bug.cgi?id=161450#c52">Comment # 52</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [Cocoa] No reliable way to get a snapshot of WKWebView"
href="https://bugs.webkit.org/show_bug.cgi?id=161450">bug 161450</a>
from <span class="vcard"><a class="email" href="mailto:bdakin@apple.com" title="Beth Dakin <bdakin@apple.com>"> <span class="fn">Beth Dakin</span></a>
</span></b>
<pre>(In reply to <a href="show_bug.cgi?id=161450#c51">comment #51</a>)
<span class="quote">> Comment on <span class=""><a href="attachment.cgi?id=301068&action=diff" name="attach_301068" title="Patch">attachment 301068</a> <a href="attachment.cgi?id=301068&action=edit" title="Patch">[details]</a></span>
> Patch
>
> View in context:
> <a href="https://bugs.webkit.org/attachment.cgi?id=301068&action=review">https://bugs.webkit.org/attachment.cgi?id=301068&action=review</a>
>
> > 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
> </span >
Fixed.
<span class="quote">> > Source/WebKit2/ChangeLog:13
> > + It also adds a new API object WKSnapshotConfiguration.
>
> This is indented wrong.
> </span >
Fixed.
<span class="quote">> > 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.</span >
I like this! New patch incoming.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>