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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 31 17:35:10 PST 2017


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

--- Comment #42 from Beth Dakin <bdakin at apple.com> ---
(In reply to comment #39)
> Comment on attachment 299290 [details]
> 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?
> 

Not okay. Fixed!

> > 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?
> 

Oops, forgot to fix that in this patch, I'll upload a new one shortly.

> > 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?
> 

I'm open to alternatives.

> > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:918
> > +    void(^handler)(NSImage *, NSError *) = [completionHandler copy];
> 
> BlockPtr?

Fixed.

> 
> > 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 [

Fixed.

> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:948
> > +    void(^handler)(UIImage *, NSError *) = [completionHandler copy];
> 
> BlockPtr?

Fixed.

> 
> > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:955
> > +        RetainPtr<UIImage>  uiImage;
> 
> weird space before uiImage

Fixed.

-- 
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/20170201/dc9b792c/attachment.html>


More information about the webkit-unassigned mailing list