Summary: | InjectedBundleNodeHandle::renderedImage() needs to be exposed from the Cocoa WebAPI layer | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Said Abou-Hallawa <sabouhallawa> | ||||||
Component: | WebKit2 | Assignee: | Said Abou-Hallawa <sabouhallawa> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | andersca, commit-queue, webkit-bug-importer | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Said Abou-Hallawa
2015-04-02 13:31:22 PDT
Created attachment 250004 [details]
Patch
Comment on attachment 250004 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=250004&action=review > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:46 > +#if TARGET_OS_IPHONE > +- (UIImage *)renderedImage:(WKSnapshotOptions)options; > +#else > +- (NSImage *)renderedImage:(WKSnapshotOptions)options; > +#endif I think we need new availability annotation when we add a new method. > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:74 > + return [[UIImage alloc] initWithCGImage:image->bitmap()->makeCGImage().get()]; This is missing an autorelease. > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:85 > + return [[NSImage alloc] initWithCGImage:image->bitmap()->makeCGImage().get() size:NSZeroSize]; This is missing an autorelease. (In reply to comment #2) > Comment on attachment 250004 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=250004&action=review > > > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:46 > > +#if TARGET_OS_IPHONE > > +- (UIImage *)renderedImage:(WKSnapshotOptions)options; > > +#else > > +- (NSImage *)renderedImage:(WKSnapshotOptions)options; > > +#endif > > I think we need new availability annotation when we add a new method. > Yes. I also think we should call this renderedImageWithOptions: Created attachment 250091 [details]
Patch
(In reply to comment #2) > Comment on attachment 250004 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=250004&action=review > > > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:46 > > +#if TARGET_OS_IPHONE > > +- (UIImage *)renderedImage:(WKSnapshotOptions)options; > > +#else > > +- (NSImage *)renderedImage:(WKSnapshotOptions)options; > > +#endif > > I think we need new availability annotation when we add a new method. > Done. I was not aware of the Cocoa availability annotation. > > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:74 > > + return [[UIImage alloc] initWithCGImage:image->bitmap()->makeCGImage().get()]; > > This is missing an autorelease. > Done. > > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:85 > > + return [[NSImage alloc] initWithCGImage:image->bitmap()->makeCGImage().get() size:NSZeroSize]; > > This is missing an autorelease. Done. (In reply to comment #3) > (In reply to comment #2) > > Comment on attachment 250004 [details] > > Patch > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=250004&action=review > > > > > Source/WebKit2/WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:46 > > > +#if TARGET_OS_IPHONE > > > +- (UIImage *)renderedImage:(WKSnapshotOptions)options; > > > +#else > > > +- (NSImage *)renderedImage:(WKSnapshotOptions)options; > > > +#endif > > > > I think we need new availability annotation when we add a new method. > > > > Yes. I also think we should call this renderedImageWithOptions: Done. Comment on attachment 250091 [details] Patch Clearing flags on attachment: 250091 Committed r182327: <http://trac.webkit.org/changeset/182327> All reviewed patches have been landed. Closing bug. |