[Webkit-unassigned] [Bug 190529] New: [Cocoa] Snapshot of WKWebView after Presentation Updates

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Oct 12 11:18:46 PDT 2018


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

            Bug ID: 190529
           Summary: [Cocoa] Snapshot of WKWebView after Presentation
                    Updates
           Product: WebKit
           Version: WebKit Local Build
          Hardware: iPhone / iPad
                OS: iOS 11
            Status: NEW
          Severity: Enhancement
          Priority: P2
         Component: WebKit API
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jeffrey at jeffreydeng.com

The current implementation of WKWebView's take snapshot,

- (void)takeSnapshotWithConfiguration:(nullable WKSnapshotConfiguration *)snapshotConfiguration completionHandler:(void (^)(UIImage * _Nullable snapshotImage, NSError * _Nullable error))completionHandler WK_API_AVAILABLE(ios(11.0));,

does not allow us to wait for any presentation updates that may be pending before it takes the snapshot of the WKWebView. This causes certain snapshots to render blank or incorrect if taken at an inappropriate time. For example, when you take a snapshot after receiving `didFinishNavigation` the snapshot will result in a white image.

A potential solution is to queue the take snapshot function via WKWebView's do after next presentation update function,
- (void)_doAfterNextPresentationUpdate:(void (^)(void))updateBlock WK_API_AVAILABLE(macosx(10.13.4));

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181012/45c571aa/attachment.html>


More information about the webkit-unassigned mailing list