[Webkit-unassigned] [Bug 161450] No reliable way to get a snapshot of WKWebView (macOS)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jan 19 17:52:41 PST 2017
https://bugs.webkit.org/show_bug.cgi?id=161450
--- Comment #39 from Tim Horton <thorton at apple.com> ---
Comment on attachment 299290
--> https://bugs.webkit.org/attachment.cgi?id=299290
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=299290&action=review
> Source/WebKit2/UIProcess/API/Cocoa/WKSnapshotConfiguration.mm:35
> + return [self retain];
That's no copy :) Why is this OK?
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:224
> +/*! @abstract Get the snapshot for the visible viewport of WKWebView asynchronously.
s/the snapshot/a snapshot/, I think?
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:226
> + @param imageWidth The width in points of the image to return.
Points! Interesting choice. I guess it's reasonable?
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:918
> + void(^handler)(NSImage *, NSError *) = [completionHandler copy];
BlockPtr?
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:939
> + RetainPtr<NSImage> nsImage = adoptNS( [[NSImage alloc] initWithCGImage:cgImage.get() size:NSMakeSize(snapshotWidth, imageHeight)]);
weird space between adoptNS( and the [
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:948
> + void(^handler)(UIImage *, NSError *) = [completionHandler copy];
BlockPtr?
> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:955
> + RetainPtr<UIImage> uiImage;
weird space before uiImage
--
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/20170120/f406fea0/attachment.html>
More information about the webkit-unassigned
mailing list