<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - No reliable way to get a snapshot of WKWebView (macOS)"
href="https://bugs.webkit.org/show_bug.cgi?id=161450#c39">Comment # 39</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - No reliable way to get a snapshot of WKWebView (macOS)"
href="https://bugs.webkit.org/show_bug.cgi?id=161450">bug 161450</a>
from <span class="vcard"><a class="email" href="mailto:thorton@apple.com" title="Tim Horton <thorton@apple.com>"> <span class="fn">Tim Horton</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=299290&action=diff" name="attach_299290" title="Patch">attachment 299290</a> <a href="attachment.cgi?id=299290&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=299290&action=review">https://bugs.webkit.org/attachment.cgi?id=299290&action=review</a>
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:35
> + return [self retain];</span >
That's no copy :) Why is this OK?
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:224
> +/*! @abstract Get the snapshot for the visible viewport of WKWebView asynchronously.</span >
s/the snapshot/a snapshot/, I think?
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:226
> + @param imageWidth The width in points of the image to return.</span >
Points! Interesting choice. I guess it's reasonable?
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:918
> + void(^handler)(NSImage *, NSError *) = [completionHandler copy];</span >
BlockPtr?
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:939
> + RetainPtr<NSImage> nsImage = adoptNS( [[NSImage alloc] initWithCGImage:cgImage.get() size:NSMakeSize(snapshotWidth, imageHeight)]);</span >
weird space between adoptNS( and the [
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:948
> + void(^handler)(UIImage *, NSError *) = [completionHandler copy];</span >
BlockPtr?
<span class="quote">> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:955
> + RetainPtr<UIImage> uiImage;</span >
weird space before uiImage</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>