[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 Feb 9 12:47:40 PST 2017


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

Tim Horton <thorton at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #301068|review?                     |review+
              Flags|                            |

--- Comment #51 from Tim Horton <thorton at apple.com> ---
Comment on attachment 301068
  --> https://bugs.webkit.org/attachment.cgi?id=301068
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=301068&action=review

> Source/WebKit2/ChangeLog:3
> +        No reliable way to get a snapshot of WKWebView (macOS)

No need for the macOS in the title because you're adding cross-platform API

> Source/WebKit2/ChangeLog:13
> +       It also adds a new API object WKSnapshotConfiguration.

This is indented wrong.

> Source/WebKit2/UIProcess/API/Cocoa/WKWebView.h:233
> +#if TARGET_OS_IPHONE
> +- (void)takeSnapshotWithConfiguration:(WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void(^)(UIImage * _Nullable snapshotImage, NSError * _Nullable error))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
> +#else
> +- (void)takeSnapshotWithConfiguration:(WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void(^)(NSImage * _Nullable snapshotImage, NSError * _Nullable error))completionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
> +#endif

I wonder if we should accept a null snapshotConfiguration and set rectInViewCoordinates to the bounds of the WKWebView and snapshotWidth to the width of the bounds of the WKWebView.

-- 
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/20170209/07fec750/attachment-0001.html>


More information about the webkit-unassigned mailing list