Summary: | [iOS][WebKit2] Provide generic software-snapshotting API | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Tim Horton <thorton> | ||||||||
Component: | WebKit2 | Assignee: | Tim Horton <thorton> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | andersca, commit-queue, ian, mitz, sam, simon.fraser | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | 528+ (Nightly build) | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Tim Horton
2014-03-17 23:17:08 PDT
Created attachment 227078 [details]
patch
Comment on attachment 227078 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=227078&action=review > Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm:361 > + if (!imageHandle.isNull()) { > + RefPtr<WebKit::ShareableBitmap> bitmap = WebKit::ShareableBitmap::create(imageHandle, WebKit::SharedMemory::ReadOnly); > + > + if (bitmap) { > + RetainPtr<CGImageRef> cgImage; > + cgImage = bitmap->makeCGImage(); > + copiedCompletionHandler(cgImage.get()); > + } > + } > + > + [copiedCompletionHandler release]; Clients should be able to rely on the completion handler being called, even if something went wrong. Could we call the completion handler with a nil argument in this case instead of not calling it at all? Created attachment 227116 [details]
patch
Attachment 227116 [details] did not pass style-queue:
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.h:425: The parameter name "rect" adds no information, so it should be removed. [readability/parameter_name] [5]
ERROR: Source/WebKit2/WebProcess/WebPage/WebPage.h:425: The parameter name "options" adds no information, so it should be removed. [readability/parameter_name] [5]
Total errors found: 2 in 10 files
If any of these errors are false positives, please file a bug against check-webkit-style.
Created attachment 227151 [details]
ignore this patch
Comment on attachment 227151 [details]
ignore this patch
This might build, but it is attached to the wrong bug.
(In reply to comment #6) > (From update of attachment 227151 [details]) > This might build, but it is attached to the wrong bug. Re r?'d the relevant patch. |